From 3ce1f2959437e952b9db4eaeed2407424f11a4d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Sep 2011 14:34:15 -0400 Subject: Cleanup of configuration options Make several tool features mandatory and simplify the code. --- sunrpc/auth_unix.c | 6 ++---- sunrpc/clnt_perr.c | 9 +++------ sunrpc/clnt_tcp.c | 4 +--- sunrpc/clnt_udp.c | 4 +--- sunrpc/clnt_unix.c | 4 +--- sunrpc/openchild.c | 8 +++----- sunrpc/svc_simple.c | 6 ++---- sunrpc/svc_tcp.c | 6 ++---- sunrpc/svc_udp.c | 6 ++---- sunrpc/svc_unix.c | 5 +---- sunrpc/xdr.c | 4 +--- sunrpc/xdr_array.c | 5 +---- sunrpc/xdr_rec.c | 7 ++----- sunrpc/xdr_ref.c | 7 ++----- sunrpc/xdr_stdio.c | 12 +++++------- 15 files changed, 29 insertions(+), 64 deletions(-) (limited to 'sunrpc') diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index 858523eb8d..d3b5dc7dee 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle America, Inc. + * Copyright (c) 2010, 2011, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -45,15 +45,13 @@ #include #include #include +#include #include #include #include #include -#ifdef USE_IN_LIBIO -# include -#endif /* * Unix authenticator operations vector diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index e6b2460ec5..175370ebfc 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -1,7 +1,7 @@ /* * clnt_perror.c * - * Copyright (c) 2010, Oracle America, Inc. + * Copyright (c) 2010, 2011, Oracle America, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -34,11 +34,8 @@ #include #include #include - -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include static char *auth_errmsg (enum auth_stat stat) internal_function; diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index a07f50a1b1..7cfbe9e8dd 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -53,9 +53,7 @@ #include #include #include -#ifdef USE_IN_LIBIO -# include -#endif +#include extern u_long _create_xid (void); diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 83fdd8ef2a..babee9abfd 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -45,9 +45,7 @@ #include #include #include -#ifdef USE_IN_LIBIO -# include -#endif +#include #include #ifdef IP_RECVERR diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 5d361b3034..62dc8c604b 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -54,9 +54,7 @@ #include #include #include -#ifdef USE_IN_LIBIO -# include -#endif +#include extern u_long _create_xid (void); diff --git a/sunrpc/openchild.c b/sunrpc/openchild.c index 18c7d105d8..541a223bc4 100644 --- a/sunrpc/openchild.c +++ b/sunrpc/openchild.c @@ -41,11 +41,9 @@ #include #include -#ifdef USE_IN_LIBIO -# include -# define fflush(s) INTUSE(_IO_fflush) (s) -# define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m) -#endif +#include +#define fflush(s) INTUSE(_IO_fflush) (s) +#define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m) /* * returns pid, or -1 for failure diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index 49b1211bff..b8ba4ab387 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -41,10 +41,8 @@ #include #include -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include struct proglst_ { diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 74f2cd9cf3..e0515322a5 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -45,10 +45,8 @@ #include #include -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include /* * Ops vector for TCP/IP based rpc service handle diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 71be4f8221..04c8407e64 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -45,10 +45,8 @@ #include #endif -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include #define rpc_buffer(xprt) ((xprt)->xp_p1) #ifndef MAX diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index c74b2cbdc8..2b02682e72 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -46,10 +46,7 @@ #include #include #include - -#ifdef USE_IN_LIBIO -# include -#endif +#include /* * Ops vector for AF_UNIX based rpc service handle diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index f770685dea..4dd82ff044 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -39,13 +39,11 @@ #include #include #include +#include #include #include -#ifdef USE_IN_LIBIO -# include -#endif /* * constants specific to the xdr "protocol" diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c index 05162ec416..b832078342 100644 --- a/sunrpc/xdr_array.c +++ b/sunrpc/xdr_array.c @@ -40,10 +40,7 @@ #include #include #include - -#ifdef USE_IN_LIBIO -# include -#endif +#include #define LASTUNSIGNED ((u_int)0-1) diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 1e13d34bab..556c6c4bc0 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -47,11 +47,8 @@ #include #include #include - -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include static bool_t xdrrec_getlong (XDR *, long *); static bool_t xdrrec_putlong (XDR *, const long *); diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index b4bdb52ef9..7510bed873 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -39,11 +39,8 @@ #include #include #include - -#ifdef USE_IN_LIBIO -# include -# include -#endif +#include +#include #define LASTUNSIGNED ((u_int)0-1) diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c index c68f004b34..d9866063f9 100644 --- a/sunrpc/xdr_stdio.c +++ b/sunrpc/xdr_stdio.c @@ -39,13 +39,11 @@ #include #include -#ifdef USE_IN_LIBIO -# include -# define fflush(s) INTUSE(_IO_fflush) (s) -# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s) -# define ftell(s) INTUSE(_IO_ftell) (s) -# define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s) -#endif +#include +#define fflush(s) INTUSE(_IO_fflush) (s) +#define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s) +#define ftell(s) INTUSE(_IO_ftell) (s) +#define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s) static bool_t xdrstdio_getlong (XDR *, long *); static bool_t xdrstdio_putlong (XDR *, const long *); -- cgit 1.4.1