diff options
author | Greg Hudson <ghudson@mit.edu> | 2014-07-05 11:50:58 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2014-07-08 19:19:24 -0400 |
commit | 02a1123cf44381690c28f18ab2c4ba8036200539 (patch) | |
tree | 821ad7e29d2f90227b6f12dc63aaae948baa2447 /src/lib/rpc | |
parent | 6a8da91b691b8f51ac62d8142cd2fa32a69f3d15 (diff) | |
download | krb5-02a1123cf44381690c28f18ab2c4ba8036200539.zip krb5-02a1123cf44381690c28f18ab2c4ba8036200539.tar.gz krb5-02a1123cf44381690c28f18ab2c4ba8036200539.tar.bz2 |
Include autoconf.h before system headers
Include autoconf.h (either directly or via proxy) before system
headers, so that feature test macros defined there can affect the
system namespace. Where include order was changed, eliminate some
redundant or unnecessary includes.
ticket: 7961
Diffstat (limited to 'src/lib/rpc')
-rw-r--r-- | src/lib/rpc/auth_unix.c | 3 | ||||
-rw-r--r-- | src/lib/rpc/clnt_generic.c | 2 | ||||
-rw-r--r-- | src/lib/rpc/clnt_perror.c | 3 | ||||
-rw-r--r-- | src/lib/rpc/clnt_simple.c | 2 | ||||
-rw-r--r-- | src/lib/rpc/getrpcport.c | 2 | ||||
-rw-r--r-- | src/lib/rpc/pmap_rmt.c | 5 | ||||
-rw-r--r-- | src/lib/rpc/svc_auth_gss.c | 5 | ||||
-rw-r--r-- | src/lib/rpc/svc_tcp.c | 7 | ||||
-rw-r--r-- | src/lib/rpc/svc_udp.c | 6 | ||||
-rw-r--r-- | src/lib/rpc/unit-test/client.c | 2 |
10 files changed, 10 insertions, 27 deletions
diff --git a/src/lib/rpc/auth_unix.c b/src/lib/rpc/auth_unix.c index c09b524..6cb998d 100644 --- a/src/lib/rpc/auth_unix.c +++ b/src/lib/rpc/auth_unix.c @@ -45,6 +45,7 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro"; * */ +#include "autoconf.h" #include <stdio.h> #include <unistd.h> #include <string.h> @@ -54,8 +55,6 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro"; #include <gssrpc/auth.h> #include <gssrpc/auth_unix.h> -#include "autoconf.h" - /* * Unix authenticator operations vector */ diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c index da3e8e8..595c5f2 100644 --- a/src/lib/rpc/clnt_generic.c +++ b/src/lib/rpc/clnt_generic.c @@ -36,12 +36,12 @@ static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI"; #endif +#include "autoconf.h" #include <string.h> #include <gssrpc/rpc.h> #include <sys/socket.h> #include <sys/errno.h> #include <netdb.h> -#include "autoconf.h" /* * Generic client creation: takes (hostname, program-number, protocol) and diff --git a/src/lib/rpc/clnt_perror.c b/src/lib/rpc/clnt_perror.c index b21ea8a..fcc3657 100644 --- a/src/lib/rpc/clnt_perror.c +++ b/src/lib/rpc/clnt_perror.c @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; /* * clnt_perror.c */ +#include "autoconf.h" #include <stdio.h> #include <string.h> #include <errno.h> @@ -46,8 +47,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; #include <gssrpc/auth.h> #include <gssrpc/clnt.h> -#include "autoconf.h" - #ifndef HAVE_STRERROR #ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c index df8f246..4ec99ed 100644 --- a/src/lib/rpc/clnt_simple.c +++ b/src/lib/rpc/clnt_simple.c @@ -40,6 +40,7 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro"; * Simplified front end to rpc. */ +#include "autoconf.h" #include <stdio.h> /* for close() */ #include <unistd.h> @@ -48,7 +49,6 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro"; #include <netdb.h> #include <string.h> #include <port-sockets.h> -#include "autoconf.h" static struct callrpc_private { CLIENT *client; diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c index 32ff739..e281754 100644 --- a/src/lib/rpc/getrpcport.c +++ b/src/lib/rpc/getrpcport.c @@ -32,13 +32,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "autoconf.h" #include <stdio.h> #include <string.h> #include <gssrpc/rpc.h> #include <gssrpc/pmap_clnt.h> #include <netdb.h> #include <sys/socket.h> -#include "autoconf.h" int gssrpc_getrpcport( diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c index 10d9e3f..cd0b309 100644 --- a/src/lib/rpc/pmap_rmt.c +++ b/src/lib/rpc/pmap_rmt.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; * remote call and broadcast service */ +#include "k5-platform.h" #include <unistd.h> #include <gssrpc/rpc.h> #include <gssrpc/pmap_prot.h> @@ -50,8 +51,6 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #ifdef sun #include <sys/sockio.h> #endif -#include <stdio.h> -#include <errno.h> #ifdef OSF1 #include <net/route.h> #include <sys/mbuf.h> @@ -60,9 +59,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #include <sys/ioctl.h> #include <arpa/inet.h> #define MAX_BROADCAST_SIZE 1400 -#include <string.h> #include <port-sockets.h> -#include "k5-platform.h" /* set_cloexec_fd */ static struct timeval timeout = { 3, 0 }; diff --git a/src/lib/rpc/svc_auth_gss.c b/src/lib/rpc/svc_auth_gss.c index 8da7003..09a3534 100644 --- a/src/lib/rpc/svc_auth_gss.c +++ b/src/lib/rpc/svc_auth_gss.c @@ -34,9 +34,7 @@ Id: svc_auth_gss.c,v 1.28 2002/10/15 21:29:36 kwc Exp */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "k5-platform.h" #include <gssrpc/rpc.h> #include <gssrpc/auth_gssapi.h> #ifdef HAVE_HEIMDAL @@ -46,7 +44,6 @@ #include <gssapi/gssapi.h> #include <gssapi/gssapi_generic.h> #endif -#include "k5-platform.h" /* SIZE_MAX */ #ifdef DEBUG_GSSAPI int svc_debug_gss = DEBUG_GSSAPI; diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c index f052203..d78cf55 100644 --- a/src/lib/rpc/svc_tcp.c +++ b/src/lib/rpc/svc_tcp.c @@ -43,15 +43,10 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; * and a record/tcp stream. */ -#include <stdio.h> -#include <string.h> +#include "k5-platform.h" #include <unistd.h> #include <gssrpc/rpc.h> #include <sys/socket.h> -#include <errno.h> -#include <stdlib.h> -#include "autoconf.h" -#include "k5-platform.h" /* set_cloexec_fd */ #include <port-sockets.h> #include <socket-utils.h> /*extern bool_t abort(); diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c index 9280061..f70bf01 100644 --- a/src/lib/rpc/svc_udp.c +++ b/src/lib/rpc/svc_udp.c @@ -41,19 +41,15 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; * achieving execute-at-most-once semantics.) */ -#include <stdio.h> -#include <string.h> +#include "k5-platform.h" #include <unistd.h> #include <gssrpc/rpc.h> #include <sys/socket.h> -#include <errno.h> -#include "autoconf.h" #ifdef HAVE_SYS_UIO_H #include <sys/uio.h> #endif #include <port-sockets.h> #include <socket-utils.h> -#include "k5-platform.h" #ifndef GETSOCKNAME_ARG3_TYPE diff --git a/src/lib/rpc/unit-test/client.c b/src/lib/rpc/unit-test/client.c index 646477f..06b0863 100644 --- a/src/lib/rpc/unit-test/client.c +++ b/src/lib/rpc/unit-test/client.c @@ -5,11 +5,11 @@ * */ +#include "autoconf.h" #include <stdio.h> #include <string.h> #include <netdb.h> #include <sys/socket.h> -#include "autoconf.h" #ifdef HAVE_UNISTD_H #include <unistd.h> #endif |