fseek: avoid compilation failure when fflush is replaced
authorEric Blake <ebb9@byu.net>
Tue, 27 Oct 2009 16:42:50 +0000 (10:42 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 28 Oct 2009 00:49:20 +0000 (18:49 -0600)
commit5abb9c9cbcf1c199155bce1f10324ce0e45f1e90
tree1df61459bdedfc4bcab33b71ed8e167f5830c961
parent18f9c249b3b9712713407bdfb67b9ba27ba311cb
fseek: avoid compilation failure when fflush is replaced

./gnulib-tool --import fseek fwritable failed on Debian, due
to broken fflush() pulling in rpl_fseeko that mistakenly
overwrote fseek() as function-like macro.

* m4/fseek.m4 (gl_REPLACE_FSEEK): New macro.
* m4/fseeko.m4 (gl_REPLACE_FSEEKO): Also replace fseek, if fseek
module is in use.
* lib/stdio.in.h (GNULIB_FSEEKO): Only poison fseek if fseek
module is not in use; since REPLACE_FSEEK worked otherwise.
(GNULIB_FTELLO): Likewise for ftell.
Reported by Ian Beckwith and others.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/stdio.in.h
m4/fseek.m4
m4/fseeko.m4