diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2016-08-17 10:16:47 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-08-17 10:16:47 -0400 |
commit | 196e8f3abaa6e8899ba2655c6c2d8751e33a9795 (patch) | |
tree | e2f6614aa056c51999378ea64f72c87337944acb /src/warmstart.c | |
parent | 44bf15b868619638e689effa1f533abf4c101e53 (diff) | |
download | rpcbind-196e8f3abaa6e8899ba2655c6c2d8751e33a9795.tar.gz |
src: remove use of the __P() macro
The __P() macro is a legacy compatibility macro aimed making pre-ANSI
(i.e. K&R) compilers that do not support function prototypes happy,
while still allowing such prototypes for ANSI-compliant compilers.
Since virtually all compilers have been ANSI-compliant for a few decades
now, use of __P() is totally useless.
Furthermore, __P() is defined in the non-standard sys/cdefs.h header.
This header is present in glibc and uClibc, and both have it included
from many of their headers. So, sys/cdefs.h is automagically included in
most cases and its macros are available.
However, the musl C library does not provide this sys/cdefs.h header.
Thus, the build breaks on musl.
For all the above reasons, get rid of __P() wherever it is used; just
always declare real function prototypes.
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Steve Dickson <steved@redhat.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Steve Dickson <SteveD@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src/warmstart.c')
-rw-r--r-- | src/warmstart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/warmstart.c b/src/warmstart.c index b6eb73e..122a058 100644 --- a/src/warmstart.c +++ b/src/warmstart.c @@ -58,8 +58,8 @@ #define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr" #endif -static bool_t write_struct __P((char *, xdrproc_t, void *)); -static bool_t read_struct __P((char *, xdrproc_t, void *)); +static bool_t write_struct(char *, xdrproc_t, void *); +static bool_t read_struct(char *, xdrproc_t, void *); static bool_t write_struct(char *filename, xdrproc_t structproc, void *list) |