fcntl-h, stdio, sys_ioctl: fix declarations
authorEric Blake <ebb9@byu.net>
Tue, 15 Dec 2009 13:51:24 +0000 (06:51 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 16 Dec 2009 04:20:15 +0000 (21:20 -0700)
commitc150f13de37b0881b46da70a6977cdce3ca67922
tree9d152839b2c71851296e1d4731262acce6256b3d
parent3fd9a2df88c558b27be3a585ca2978dbf9b5da53
fcntl-h, stdio, sys_ioctl: fix declarations

We cannot use a function-like macro to provide a link-time warning
of a variadic function during GNULIB_POSIXCHECK; at least, not
without assuming C99 variadic macros.  We can, however,
use an object-like macro (as was already done for printf).

On the other hand, this patch is only a stop-gap measure to fix
an obvious bug; a more complete patch that switches from a
link-time warning (specific to GNU ld, gcc, and ELF image) to
a compile-time attribute is in the works.

* lib/stdio.in.h (dprintf): Use of link warning on a variadic
function must not take arguments.
* lib/sys_ioctl.in.h (ioctl): Likewise.
* lib/fcntl.in.h (openat): Likewise.  Declare extern.
(open): Add a link warning.

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