rx: Tidy header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 27 Mar 2011 21:18:23 +0000 (22:18 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 3 Apr 2011 16:41:56 +0000 (09:41 -0700)
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.

Change-Id: I7bb08d7ec7a75b485f7f619fd4d8179d4c7349f0
Reviewed-on: http://gerrit.openafs.org/4403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

30 files changed:
src/rx/rx.c
src/rx/rx_clock.c
src/rx/rx_clock_nt.c
src/rx/rx_conncache.c
src/rx/rx_event.c
src/rx/rx_getaddr.c
src/rx/rx_globals.c
src/rx/rx_identity.c
src/rx/rx_kcommon.c
src/rx/rx_lwp.c
src/rx/rx_misc.c
src/rx/rx_multi.c
src/rx/rx_null.c
src/rx/rx_opaque.c
src/rx/rx_packet.c
src/rx/rx_pthread.c
src/rx/rx_rdwr.c
src/rx/rx_stats.c
src/rx/rx_trace.c
src/rx/rx_user.c
src/rx/xdr.c
src/rx/xdr_afsuuid.c
src/rx/xdr_array.c
src/rx/xdr_arrayn.c
src/rx/xdr_int32.c
src/rx/xdr_int64.c
src/rx/xdr_len.c
src/rx/xdr_mem.c
src/rx/xdr_rec.c
src/rx/xdr_rx.c

index 6c80715..f7f6d79 100644 (file)
@@ -10,7 +10,7 @@
 /* RX:  Extended Remote Procedure Call */
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 #ifdef KERNEL
 # include "afs/sysincludes.h"
@@ -63,26 +63,12 @@ extern afs_int32 afs_termState;
 # include "afs/rxgen_consts.h"
 #else /* KERNEL */
 # include <roken.h>
-# include <sys/types.h>
-# include <string.h>
-# include <stdarg.h>
-# include <errno.h>
-# ifdef HAVE_STDINT_H
-#  include <stdint.h>
-# endif
+
 # ifdef AFS_NT40_ENV
-#  include <stdlib.h>
-#  include <fcntl.h>
 #  include <afs/afsutil.h>
 #  include <WINNT\afsreg.h>
-# else
-#  include <sys/socket.h>
-#  include <sys/file.h>
-#  include <netdb.h>
-#  include <sys/stat.h>
-#  include <netinet/in.h>
-#  include <sys/time.h>
 # endif
+
 # include "rx_user.h"
 #endif /* KERNEL */
 
index 38e726b..057e1c4 100644 (file)
@@ -11,7 +11,7 @@
 /* See rx_clock.h for calling conventions */
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 #ifdef AFS_SUN59_ENV
 #include <sys/time_impl.h>
 #  include "afsincludes.h"
 # endif /* !UKERNEL */
 #else /* KERNEL */
-# include <sys/time.h>
-# ifdef HAVE_SIGNAL_H
-#  include <signal.h>
-# endif
-# include <stdio.h>
-# include <errno.h>
-# include <stdlib.h>
+# include <roken.h>
 #endif
 
 #include "rx.h"
index 1a371e7..72bc76e 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <stdio.h>
-#include <stdlib.h>
 #include <windef.h>
 #include <winbase.h>
 #include "rx_clock.h"
index 670cda1..1202f58 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif /* KERNEL */
+#include <roken.h>
 
-#include <sys/types.h>
-#include <errno.h>
 #include "rx.h"
 
 /*
index f822419..b520f16 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 #ifdef AFS_SUN59_ENV
 # include <sys/time_impl.h>
@@ -41,16 +41,12 @@ extern void *osi_Alloc();
 # endif
 #else /* KERNEL */
 # include <roken.h>
-# include <stdio.h>
 # include "rx_user.h"
 # ifdef AFS_PTHREAD_ENV
 #  include "rx_pthread.h"
 # else
 #  include "rx_lwp.h"
 # endif
-# ifdef AFS_NT40_ENV
-#  include <malloc.h>
-# endif
 #endif /* KERNEL */
 
 #include "rx.h"
index 55f3e35..0c7d3ae 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
 #ifndef KERNEL
+
+# include <roken.h>
 # ifndef AFS_NT40_ENV
-#  include <sys/types.h>
-#  include <sys/socket.h>
-#  include <sys/time.h>
-#  include <net/if.h>
-#  include <netinet/in.h>
-#  include <sys/ioctl.h>
-#  include <string.h>
+# include <net/if.h>
 #  if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 #   include <sys/sysctl.h>
 #   ifndef AFS_ARM_DARWIN_ENV
index bc029a8..cfaaa04 100644 (file)
@@ -19,7 +19,7 @@
 #endif
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 /* Enable data initialization when the header file is included */
 #define GLOBALSINIT(stuff) = stuff
index 514d97b..ae9c694 100644 (file)
@@ -27,8 +27,6 @@
 
 #ifndef KERNEL
 # include <roken.h>
-# include <sys/types.h>
-# include <string.h>
 #else
 # include "afs/sysincludes.h"
 # include "afsincludes.h"
index b04429f..a7c9759 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 
 #include "rx/rx_kcommon.h"
index 8ad021b..1de0857 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif /* KERNEL */
+#include <roken.h>
 
-#include <sys/types.h>         /* fd_set on older platforms */
-#include <errno.h>
-#include <signal.h>
-#ifdef AFS_NT40_ENV
-# include <winsock2.h>
-#else
-# include <unistd.h>           /* select() prototype */
-# include <sys/time.h>         /* struct timeval, select() prototype */
-# ifndef FD_SET
-#  include <sys/select.h>      /* fd_set on newer platforms */
-# endif
-# include <sys/socket.h>
-# include <sys/file.h>
-# include <netdb.h>
-# include <sys/stat.h>
-# include <netinet/in.h>
-# include <net/if.h>
-# include <sys/ioctl.h>
-# include <sys/time.h>
-#endif
+#include <lwp.h>
 
 #include "rx.h"
 #include "rx_atomic.h"
 #include "rx_globals.h"
 #include "rx_stats.h"
-#include <lwp.h>
 
 #define MAXTHREADNAMELENGTH 64
 
index 1d39f4e..c01b857 100644 (file)
 # include <afsincludes.h>
 #else
 # include <roken.h>
-# ifdef AFS_NT40_ENV
-#  include <winsock2.h>
-#  include <malloc.h>
-# else
-#  include <sys/param.h>
-# endif
-# include <errno.h>
 # include <afs/errors.h>
 # include "xdr.h"
 # ifdef AFS_PTHREAD_ENV
 #  include "rx.h"
 # endif /* AFS_PTHREAD_ENV */
-# include <stdlib.h>
-# include <string.h>
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
 # ifdef AFS_NT40_ENV
 #  ifndef EDQUOT
 #   define EDQUOT WSAEDQUOT
index c6af54a..cefa0a2 100644 (file)
@@ -11,7 +11,7 @@
 #include <afs/param.h>
 
 #ifdef KERNEL
-#include "afs/sysincludes.h"
+# include "afs/sysincludes.h"
 #else /* KERNEL */
 # include <roken.h>
 #endif /* KERNEL */
index 231e7ae..809fc67 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <afsconfig.h>
-#include "afs/param.h"
+#include <afs/param.h>
 
 #ifdef KERNEL
 # ifndef UKERNEL
index a1b61d5..db3e407 100644 (file)
@@ -27,9 +27,6 @@
 
 #ifndef KERNEL
 # include <roken.h>
-# include <sys/types.h>
-# include <string.h>
-# include <errno.h>
 #else
 # include "afs/sysincludes.h"
 # include "afsincludes.h"
index a518bb1..138ca53 100644 (file)
 # endif /* defined(UKERNEL) */
 #else /* KERNEL */
 # include <roken.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# include <errno.h>
-# include <stdlib.h>
 # include <assert.h>
-# include <string.h>
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
 # if defined(AFS_NT40_ENV)
-#  include <winsock2.h>
 #  ifndef EWOULDBLOCK
 #   define EWOULDBLOCK WSAEWOULDBLOCK
 #  endif
 #  include "rx_user.h"
 #  include "rx_xmit_nt.h"
-# else
-#  include <sys/socket.h>
-#  include <netinet/in.h>
 # endif
 # include <lwp.h>
 #endif /* KERNEL */
index 9c3edac..87a2c05 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif /* KERNEL */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifndef AFS_NT40_ENV
-# include <sys/socket.h>
-# include <sys/file.h>
-# include <netdb.h>
-# include <netinet/in.h>
-# include <net/if.h>
-# include <sys/ioctl.h>
-# include <sys/time.h>
-# include <unistd.h>
-# include <assert.h>
-#endif
-#include <sys/stat.h>
+#include <roken.h>
+
+#include <assert.h>
 
 #include "rx.h"
 #include "rx_globals.h"
index 53121e8..61025ee 100644 (file)
 # include "afs/lock.h"
 #else /* KERNEL */
 # include <roken.h>
-# include <sys/types.h>
-# include <string.h>
-# ifdef AFS_NT40_ENV
-#  include <winsock2.h>
-# else /* !AFS_NT40_ENV */
-#  include <sys/socket.h>
-#  include <sys/file.h>
-#  include <netdb.h>
-#  include <netinet/in.h>
-#  include <sys/stat.h>
-#  include <sys/time.h>
-#  include <unistd.h>
-# endif /* !AFS_NT40_ENV */
 #endif /* KERNEL */
 
 #include "rx.h"
index 13935f3..d6325e1 100644 (file)
@@ -33,7 +33,6 @@
 
 #if !defined(KERNEL)
 #include <roken.h>
-#include <string.h>
 #endif
 
 #ifdef KERNEL
index eee07a4..ded4722 100644 (file)
@@ -10,9 +10,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif /* KERNEL */
+#include <roken.h>
 
 #ifndef RXDEBUG
 char rxi_tracename[80] = "\0Tracing not compiled in";
@@ -24,14 +22,6 @@ main(int argc, char **argv)
 }
 #endif
 #else
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <io.h>
-#else
-#include <sys/file.h>
-#include <unistd.h>
-#endif
 
 #include "rx.h"
 #include "rx_atomic.h"
index e9a8363..e4b59bb 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif /* KERNEL */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
+#include <roken.h>
+
 #ifdef AFS_NT40_ENV
 # include <WINNT/syscfg.h>
 #else
-# include <sys/socket.h>
-# include <sys/file.h>
-# include <netdb.h>
-# include <sys/stat.h>
-# include <netinet/in.h>
-# include <sys/time.h>
 # include <net/if.h>
-# include <sys/ioctl.h>
-# include <unistd.h>
 #endif
-#include <fcntl.h>
 #if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
 # include <sys/syscall.h>
 #endif
 #endif
 #endif
 
-#ifndef AFS_NT40_ENV
-# include <sys/time.h>
-#endif
-
 #include "rx.h"
 #include "rx_atomic.h"
 #include "rx_globals.h"
index bb088e6..884627e 100644 (file)
@@ -32,7 +32,6 @@
 
 #ifndef KERNEL
 # include <roken.h>
-# include <string.h>
 #endif
 
 
@@ -53,8 +52,6 @@
 #ifndef AFS_LINUX20_ENV
 #include <sys/systm.h>
 #endif
-#else
-#include <stdio.h>
 #endif
 #include "xdr.h"
 #include "rx.h"
index f32c71d..da7855a 100644 (file)
  */
 
 #include <afsconfig.h>
-#include "afs/param.h"
-
+#include <afs/param.h>
 
 #if defined(KERNEL) && !defined(UKERNEL)
 #ifdef AFS_LINUX20_ENV
 #include "h/string.h"
-#if 0
-#define bzero(A, C) memset((A), 0, (C))
-#endif
 #else
 #include <sys/param.h>
 #include <sys/systm.h>
 #endif
-#else
-#include <stdio.h>
+#include <roken.h>
 #endif
 #include "xdr.h"
 
index 8f8ddc9..14378eb 100644 (file)
 #include <sys/param.h>
 #ifdef AFS_LINUX20_ENV
 #include "h/string.h"
-#if 0
-#define bzero(A,C) memset((A), 0, (C))
-#endif
 #else
 #ifndef AFS_DARWIN90_ENV
 #include <sys/systm.h>
 #endif
 #endif /* AFS_LINUX20_ENV */
-#else
-#include <stdio.h>
-#include <string.h>
 #endif
 #include "xdr.h"
 
index 28db315..a7301d3 100644 (file)
 #include <sys/param.h>
 #ifdef AFS_LINUX20_ENV
 #include "h/string.h"
-#if 0
-#define bzero(A,C) memset((A), 0, (C))
-#endif
 #else
 #include <sys/systm.h>
 #endif
 #else
-#include <stdio.h>
-#include <string.h>
+#include <roken.h>
 #endif
 #include "xdr.h"
 
index 82c5648..c30b4e2 100644 (file)
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
 #include <afs/param.h>
-#endif
 
 
 #ifndef        NeXT
@@ -40,7 +36,7 @@
 #if defined(KERNEL) && !defined(UKERNEL)
 #include <sys/param.h>
 #else
-#include <stdio.h>
+#include <roken.h>
 #endif
 #include "xdr.h"
 
index bf1a571..c1925ed 100644 (file)
@@ -15,7 +15,7 @@
 #include <sys/systm.h>
 #endif
 #else
-#include <stdio.h>
+#include <roken.h>
 #endif
 #include "xdr.h"
 
index 8e2c4cb..b3af0dc 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef KERNEL
 # include "afs/sysincludes.h"
 #else
-# include <stdlib.h>
+# include <roken.h>
 #endif
 
 #include "xdr.h"
index 0dd5daa..f6af534 100644 (file)
 #ifdef KERNEL
 # include "afs/sysincludes.h"
 #else
-# include <string.h>
+# include <roken.h>
 # include <limits.h>
-# ifndef AFS_NT40_ENV
-#  include <netinet/in.h>
-# endif
 #endif
 
 #include "xdr.h"
index abeb44d..6f14cb7 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include <roken.h>
 #include "xdr.h"
-#ifndef AFS_NT40_ENV
-#include <sys/time.h>
-#include <netinet/in.h>
-#endif
-
-#include <string.h>
-
 
 /*  * A record is composed of one or more record fragments.
  * A record fragment is a two-byte header followed by zero to
index 68da60a..a6e8e0c 100644 (file)
 # endif /* !UKERNEL */
 #else /* KERNEL */
 # include <roken.h>
-# include <sys/types.h>
-# include <stdio.h>
-# ifndef AFS_NT40_ENV
-#  include <netinet/in.h>
-# endif
 #endif /* KERNEL */
 
 #include "rx.h"