]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Reorganise includes
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 1 Oct 2010 08:36:06 +0000 (09:36 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Sat, 6 Nov 2010 19:36:30 +0000 (12:36 -0700)
RX files were including the same header set in three different places,
once for user-land builds, once for kernel builds and once for ukernel.
The duplication was a bit pointless, and really frustrating when adding
new headers. So, reorganise the includes so that we only list headers
that are used in all three builds in one location.

Also take the opportunity to indent the #ifdefs so that it is clear
what is going on, and to remove some more of AFS_OSF_ENV and
AFS_AUX_ENV from kernel builds.

Change-Id: Ic2b5d39de4dd406bbc0acaa29fc876ac882ccf10
Reviewed-on: http://gerrit.openafs.org/3160
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
18 files changed:
src/rx/rx.c
src/rx/rx.h
src/rx/rx_clock.c
src/rx/rx_event.c
src/rx/rx_getaddr.c
src/rx/rx_globals.c
src/rx/rx_lwp.c
src/rx/rx_misc.c
src/rx/rx_multi.c
src/rx/rx_null.c
src/rx/rx_packet.c
src/rx/rx_pthread.c
src/rx/rx_rdwr.c
src/rx/rx_trace.c
src/rx/rx_user.c
src/rx/rx_xmit_nt.c
src/rx/xdr.c
src/rx/xdr_rx.c

index 5a189a26fa8b6d612e29efe68654ef180b6cc30a..f8a5496d2859ead590ad4dcbef0e34f6f3436c29 100644 (file)
 /* RX:  Extended Remote Procedure Call */
 
 #include <afsconfig.h>
-#ifdef KERNEL
 #include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
-
 
 #ifdef KERNEL
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#ifndef UKERNEL
-#include "h/types.h"
-#include "h/time.h"
-#include "h/stat.h"
-#ifdef AFS_OSF_ENV
-#include <net/net_globals.h>
-#endif /* AFS_OSF_ENV */
-#ifdef AFS_LINUX20_ENV
-#include "h/socket.h"
-#endif
-#include "netinet/in.h"
-#ifdef AFS_SUN57_ENV
-#include "inet/common.h"
-#include "inet/ip.h"
-#include "inet/ip_ire.h"
-#endif
-#include "afs/afs_args.h"
-#include "afs/afs_osi.h"
-#ifdef RX_KERNEL_TRACE
-#include "rx_kcommon.h"
-#endif
-#if    (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
-#include "h/systm.h"
-#endif
-#ifdef RXDEBUG
-#undef RXDEBUG                 /* turn off debugging */
-#endif /* RXDEBUG */
-#if defined(AFS_SGI_ENV)
-#include "sys/debug.h"
-#endif
-#include "afsint.h"
-#ifdef AFS_OSF_ENV
-#undef kmem_alloc
-#undef kmem_free
-#undef mem_alloc
-#undef mem_free
-#endif /* AFS_OSF_ENV */
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#endif /* !UKERNEL */
-#include "afs/lock.h"
-#include "rx_kmutex.h"
-#include "rx_kernel.h"
-#include "rx_clock.h"
-#include "rx_queue.h"
-#include "rx.h"
-#include "rx_globals.h"
-#include "rx_trace.h"
-#include "rx_atomic.h"
-#include "rx_internal.h"
-#include "rx_stats.h"
-#define        AFSOP_STOP_RXCALLBACK   210     /* Stop CALLBACK process */
-#define        AFSOP_STOP_AFS          211     /* Stop AFS process */
-#define        AFSOP_STOP_BKG          212     /* Stop BKG process */
-#include "afsint.h"
+# include "afs/sysincludes.h"
+# include "afsincludes.h"
+# ifndef UKERNEL
+#  include "h/types.h"
+#  include "h/time.h"
+#  include "h/stat.h"
+#  ifdef AFS_LINUX20_ENV
+#   include "h/socket.h"
+#  endif
+#  include "netinet/in.h"
+#  ifdef AFS_SUN57_ENV
+#   include "inet/common.h"
+#   include "inet/ip.h"
+#   include "inet/ip_ire.h"
+#  endif
+#  include "afs/afs_args.h"
+#  include "afs/afs_osi.h"
+#  ifdef RX_KERNEL_TRACE
+#   include "rx_kcommon.h"
+#  endif
+#  if  defined(AFS_AIX_ENV)
+#   include "h/systm.h"
+#  endif
+#  ifdef RXDEBUG
+#   undef RXDEBUG                      /* turn off debugging */
+#  endif /* RXDEBUG */
+#  if defined(AFS_SGI_ENV)
+#   include "sys/debug.h"
+#  endif
+# else /* !UKERNEL */
+#  include "afs/sysincludes.h"
+#  include "afsincludes.h"
+# endif /* !UKERNEL */
+# include "afs/lock.h"
+# include "rx_kmutex.h"
+# include "rx_kernel.h"
+# define       AFSOP_STOP_RXCALLBACK   210     /* Stop CALLBACK process */
+# define       AFSOP_STOP_AFS          211     /* Stop AFS process */
+# define       AFSOP_STOP_BKG          212     /* Stop BKG process */
 extern afs_int32 afs_termState;
-#ifdef AFS_AIX41_ENV
-#include "sys/lockl.h"
-#include "sys/lock_def.h"
-#endif /* AFS_AIX41_ENV */
+# ifdef AFS_AIX41_ENV
+#  include "sys/lockl.h"
+#  include "sys/lock_def.h"
+# endif /* AFS_AIX41_ENV */
 # include "afs/rxgen_consts.h"
 #else /* KERNEL */
 # include <sys/types.h>
@@ -90,31 +66,33 @@ extern afs_int32 afs_termState;
 # 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.h"
+# 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"
-# include "rx_clock.h"
-# include "rx_queue.h"
-# include "rx_atomic.h"
-# include "rx_globals.h"
-# include "rx_trace.h"
-# include "rx_internal.h"
-# include "rx_stats.h"
-# include <afs/rxgen_consts.h>
 #endif /* KERNEL */
 
+#include "rx.h"
+#include "rx_clock.h"
+#include "rx_queue.h"
+#include "rx_atomic.h"
+#include "rx_globals.h"
+#include "rx_trace.h"
+#include "rx_internal.h"
+#include "rx_stats.h"
+
+#include <afs/rxgen_consts.h>
+
 #ifndef KERNEL
 #ifdef AFS_PTHREAD_ENV
 #ifndef AFS_NT40_ENV
index 2c05d30a9cba92e3fe839402110aa2e819752d55..deb50fbf13861e426efa23b31c4360dec6f883da 100644 (file)
 #ifdef KERNEL
 #include "rx_kmutex.h"
 #include "rx_kernel.h"
-#include "rx_clock.h"
-#include "rx_event.h"
-#include "rx_queue.h"
-#include "rx_packet.h"
-#include "rx_misc.h"
-#include "rx_multi.h"
 #if defined (AFS_OBSD_ENV) && !defined (MLEN)
 #include "sys/mbuf.h"
 #endif
 #include <ws2tcpip.h>
 #endif
 # include "rx_user.h"
-# include "rx_clock.h"
-# include "rx_event.h"
-# include "rx_packet.h"
-# include "rx_misc.h"
-# include "rx_null.h"
-# include "rx_multi.h"
 #ifndef AFS_NT40_ENV
 # include <netinet/in.h>
 # include <sys/socket.h>
 #endif
 #endif /* KERNEL */
 
+#include "rx_clock.h"
+#include "rx_event.h"
+#include "rx_packet.h"
+#include "rx_misc.h"
+#include "rx_null.h"
+#include "rx_multi.h"
 
 /* Configurable parameters */
 #define        RX_IDLE_DEAD_TIME       60      /* default idle dead time */
index d2ce7e9d212f5a5620a890788105ad09da7526dd..38e726bcfc79a840d370543a177b60cfc4e2419a 100644 (file)
 /* See rx_clock.h for calling conventions */
 
 #include <afsconfig.h>
-#ifdef KERNEL
 #include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
 
 #ifdef AFS_SUN59_ENV
 #include <sys/time_impl.h>
 #endif
 
-
 #ifdef KERNEL
-#ifndef UKERNEL
-#include "rx/rx_clock.h"
-#include "h/types.h"
-#include "h/time.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#include "rx/rx.h"
-#include "rx/rx_clock.h"
-#endif /* !UKERNEL */
+# ifndef UKERNEL
+#  include "h/types.h"
+#  include "h/time.h"
+# else /* !UKERNEL */
+#  include "afs/sysincludes.h"
+#  include "afsincludes.h"
+# endif /* !UKERNEL */
 #else /* KERNEL */
-#include <sys/time.h>
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
+# include <sys/time.h>
+# ifdef HAVE_SIGNAL_H
+#  include <signal.h>
+# endif
+# include <stdio.h>
+# include <errno.h>
+# include <stdlib.h>
 #endif
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
+
 #include "rx.h"
 #include "rx_clock.h"
-#endif
 
 #if !defined(AFS_USE_GETTIMEOFDAY)
 /*use this package only if gettimeofday is much much costlier than getitime */
index 04f5a186b234a896a09243341523622207290faa..0d92584e0b6b2fad285fb35b6a1af8d805d9f376 100644 (file)
@@ -8,65 +8,51 @@
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
 #include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
 
 #ifdef AFS_SUN59_ENV
-#include <sys/time_impl.h>
+# include <sys/time_impl.h>
 #endif
 
-
 #ifdef KERNEL
-#ifndef UKERNEL
-#include "afs/afs_osi.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#endif /* !UKERNEL */
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx_event.h"
-#include "rx/rx_kernel.h"
-#include "rx_kmutex.h"
-#ifdef RX_ENABLE_LOCKS
-#include "rx/rx.h"
-#endif /* RX_ENABLE_LOCKS */
-#include "rx/rx_globals.h"
-#if defined(AFS_SGI_ENV)
-#include "sys/debug.h"
+# ifndef UKERNEL
+#  include "afs/afs_osi.h"
+# else /* !UKERNEL */
+#  include "afs/sysincludes.h"
+#  include "afsincludes.h"
+# endif /* !UKERNEL */
+# include "rx_kernel.h"
+# include "rx_kmutex.h"
+# if defined(AFS_SGI_ENV)
+#  include "sys/debug.h"
 /* These are necessary to get curproc (used by GLOCK asserts) to work. */
-#include "h/proc.h"
-#if !defined(AFS_SGI64_ENV) && !defined(UKERNEL)
-#include "h/user.h"
-#endif
+#  include "h/proc.h"
+#  if !defined(AFS_SGI64_ENV) && !defined(UKERNEL)
+#   include "h/user.h"
+#  endif
 extern void *osi_Alloc();
-#endif
-#if defined(AFS_OBSD_ENV)
-#include "h/proc.h"
-#endif
+# endif
+# if defined(AFS_OBSD_ENV)
+#  include "h/proc.h"
+# endif
 #else /* KERNEL */
-#include <stdio.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"
 #include "rx_clock.h"
 #include "rx_queue.h"
 #include "rx_event.h"
-#include "rx_user.h"
-#ifdef AFS_PTHREAD_ENV
-#include <rx/rx_pthread.h>
-#else
-#include "rx_lwp.h"
-#endif
-#ifdef RX_ENABLE_LOCKS
-#include "rx.h"
-#endif /* RX_ENABLE_LOCKS */
 #include "rx_globals.h"
-#ifdef AFS_NT40_ENV
-#include <malloc.h>
-#endif
-#endif /* KERNEL */
-
 
 /* All event processing is relative to the apparent current time given by clock_GetTime */
 
index 0859316886eddc4b5e6977d01687ce229e2501b5..55f3e35bdceda29533d8fcefb7a0ceeee739e090 100644 (file)
 
 
 #ifndef KERNEL
-#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>
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#include <sys/sysctl.h>
-#ifndef AFS_ARM_DARWIN_ENV
-#include <net/route.h>
-#endif
-#include <net/if_dl.h>
-#endif
+# 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>
+#  if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#   include <sys/sysctl.h>
+#   ifndef AFS_ARM_DARWIN_ENV
+#    include <net/route.h>
+#   endif
+#   include <net/if_dl.h>
+#  endif
 
 /*
  * By including this, we get any system dependencies. In particular,
  * the pthreads for solaris requires the socket call to be mapped.
  */
-#include "rx.h"
-#include "rx_globals.h"
-#endif /* AFS_NT40_ENV */
+#  include "rx.h"
+#  include "rx_globals.h"
+# endif /* AFS_NT40_ENV */
 #else /* KERNEL */
-#ifdef UKERNEL
-#include "rx/rx_kcommon.h"
-#else /* UKERNEL */
-#include "rx/rx.h"
-#endif /* UKERNEL */
+# ifdef UKERNEL
+#  include "rx/rx_kcommon.h"
+# else /* UKERNEL */
+#  include "rx/rx.h"
+# endif /* UKERNEL */
 #endif /* KERNEL */
 
 #define NIFS           512
 
 #if defined(AFS_USR_DFBSD_ENV)
-#include <net/if.h>
-#include <sys/sockio.h>
+# include <net/if.h>
+# include <sys/sockio.h>
 #endif
 
 #ifdef KERNEL
index 11128f5c1436d06d5c8f57b03ed1ab0ff2c54936..763baa367e9128d4ea164a5a8e026c6e38cb9fe3 100644 (file)
 #endif
 
 #include <afsconfig.h>
-#ifdef KERNEL
 #include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
 
 
 /* Enable data initialization when the header file is included */
index 8675992b6141597e71a9f28e1a6225d362b4b097..acca31be0fe0175962e3945d8554a2811b92683c 100644 (file)
@@ -22,9 +22,9 @@
 #include <afs/param.h>
 
 
-# include <sys/types.h>                /* fd_set on older platforms */
-# include <errno.h>
-# include <signal.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 <sys/ioctl.h>
 # include <sys/time.h>
 #endif
-# include "rx.h"
-# include "rx_atomic.h"
-# include "rx_globals.h"
-# include "rx_stats.h"
-# 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 bdbeab295220af21d06a6aa0732bfe0cb2a1cc5a..d22e3d7be63589e9c4e4fde8d50b6bb74049c27f 100644 (file)
 
 
 #ifdef KERNEL
-#include <afs/sysincludes.h>
-#include <afsincludes.h>
+# include <afs/sysincludes.h>
+# include <afsincludes.h>
 #else
-#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
-#endif /* EDQUOT */
-#endif /* AFS_NT40_ENV */
+# 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
+#  endif /* EDQUOT */
+# endif /* AFS_NT40_ENV */
 #endif
 
 /*
index 56b8a8994a81fcef632e65322b3760500b8413d0..704024a79cd8be54a2517ff3fe230eb15df673a0 100644 (file)
 
 #ifdef KERNEL
 #include "afs/sysincludes.h"
-#include "rx/rx.h"
-#else /* KERNEL */
-# include "rx.h"
-#endif /* KERNEL */
+#endif
+
+#include "rx.h"
 
 /*
  * multi.c and multi.h, together with some rxgen hooks, provide a way of
index 8334057b4521433cf4e7a1dd2e72fc15fb162ed9..cc98bf4f20cd2d63f30ad32ee7ca53d96a1dc9ed 100644 (file)
@@ -8,24 +8,18 @@
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
 #include "afs/param.h"
-#else
-#include <afs/param.h>
-#endif
-
 
 #ifdef KERNEL
-#ifndef        UKERNEL
-#include "h/types.h"
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#endif /* !UKERNEL */
-#include "rx/rx.h"
-#else /* KERNEL */
-#include "rx.h"
+# ifndef UKERNEL
+#  include "h/types.h"
+# else /* !UKERNEL */
+#  include "afs/sysincludes.h"
+# endif /* !UKERNEL */
 #endif /* KERNEL */
 
+#include "rx.h"
+
 /* The null security object.  No authentication, no nothing. */
 
 static struct rx_securityOps null_ops;
index 69471d9568744c20df48cc90abbb0386d6cf60a4..69ccd6642e7f720221c0d8f9845022c1267af595 100644 (file)
@@ -8,91 +8,74 @@
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
 #include <afs/param.h>
-#endif
 
 #ifdef KERNEL
-#if defined(UKERNEL)
-#include "afs/sysincludes.h"
-#include "afsincludes.h"
-#include "rx/rx_kcommon.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx_packet.h"
-#include "rx/rx_atomic.h"
-#include "rx/rx_internal.h"
-#include "rx/rx_stats.h"
-#else /* defined(UKERNEL) */
-#ifdef RX_KERNEL_TRACE
-#include "../rx/rx_kcommon.h"
-#endif
-#include "h/types.h"
-#ifndef AFS_LINUX20_ENV
-#include "h/systm.h"
-#endif
-#if defined(AFS_SGI_ENV) || defined(AFS_HPUX110_ENV) || defined(AFS_NBSD50_ENV)
-#include "afs/sysincludes.h"
-#endif
-#if defined(AFS_OBSD_ENV)
-#include "h/proc.h"
-#endif
-#include "h/socket.h"
-#if !defined(AFS_SUN5_ENV) &&  !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
-#if    !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
-#include "sys/mount.h"         /* it gets pulled in by something later anyway */
-#endif
-#include "h/mbuf.h"
-#endif
-#include "netinet/in.h"
-#include "afs/afs_osi.h"
-#include "rx_kmutex.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx_atomic.h"
-#ifdef AFS_SUN5_ENV
-#include <sys/sysmacros.h>
-#endif
-#include "rx/rx_packet.h"
-#include "rx_internal.h"
-#include "rx_stats.h"
-#endif /* defined(UKERNEL) */
-#include "rx/rx_globals.h"
+# if defined(UKERNEL)
+#  include "afs/sysincludes.h"
+#  include "afsincludes.h"
+#  include "rx_kcommon.h"
+# else /* defined(UKERNEL) */
+#  ifdef RX_KERNEL_TRACE
+#   include "rx_kcommon.h"
+#  endif
+#  include "h/types.h"
+#  ifndef AFS_LINUX20_ENV
+#   include "h/systm.h"
+#  endif
+#  if defined(AFS_SGI_ENV) || defined(AFS_HPUX110_ENV) || defined(AFS_NBSD50_ENV)
+#   include "afs/sysincludes.h"
+#  endif
+#  if defined(AFS_OBSD_ENV)
+#   include "h/proc.h"
+#  endif
+#  include "h/socket.h"
+#  if !defined(AFS_SUN5_ENV) &&  !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
+#   if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
+#    include "sys/mount.h"             /* it gets pulled in by something later anyway */
+#   endif
+#   include "h/mbuf.h"
+#  endif
+#  include "netinet/in.h"
+#  include "afs/afs_osi.h"
+#  include "rx_kmutex.h"
+# endif /* defined(UKERNEL) */
 #else /* KERNEL */
-#include "sys/types.h"
-#include <sys/stat.h>
-#include <errno.h>
-#if defined(AFS_NT40_ENV)
-#include <winsock2.h>
-#ifndef EWOULDBLOCK
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#endif
-#include "rx_user.h"
-#include "rx_xmit_nt.h"
-#include <stdlib.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.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 */
+
+#ifdef AFS_SUN5_ENV
+# include <sys/sysmacros.h>
 #endif
-#include "rx_clock.h"
+
 #include "rx.h"
+#include "rx_clock.h"
 #include "rx_queue.h"
-#ifdef AFS_SUN5_ENV
-#include <sys/sysmacros.h>
-#endif
 #include "rx_packet.h"
 #include "rx_atomic.h"
 #include "rx_globals.h"
 #include "rx_internal.h"
 #include "rx_stats.h"
-#include <lwp.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#endif /* KERNEL */
 
 #ifdef RX_LOCKS_DB
 /* rxdb_fileID is used to identify the lock location, along with line#. */
index ae92c6718865a5c16158573129bd9b2df7939bf2..ef63d896cf1feace5ed92c04594c924670ae1152 100644 (file)
 # include <assert.h>
 #endif
 #include <sys/stat.h>
-#include <rx/rx.h>
-#include <rx/rx_globals.h>
-#include <rx/rx_pthread.h>
-#include <rx/rx_clock.h>
+
+#include "rx.h"
+#include "rx_globals.h"
+#include "rx_pthread.h"
+#include "rx_clock.h"
 #include "rx_atomic.h"
 
 /* Set rx_pthread_event_rescheduled if event_handler should just try
index 90f201595915ac24a20d6927453676a6c7278435..dcc9fe18cc5161a5b976971200494746e6fcffc5 100644 (file)
@@ -8,87 +8,70 @@
   */
 
 #include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
 #include <afs/param.h>
-#endif
-
 
 #ifdef KERNEL
-#ifndef UKERNEL
-#ifdef RX_KERNEL_TRACE
-#include "rx_kcommon.h"
-#endif
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#include "afs/sysincludes.h"
-#else
-#include "h/types.h"
-#include "h/time.h"
-#include "h/stat.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
-#include "h/systm.h"
-#endif
-#ifdef AFS_OSF_ENV
-#include <net/net_globals.h>
-#endif /* AFS_OSF_ENV */
-#ifdef AFS_LINUX20_ENV
-#include "h/socket.h"
-#endif
-#include "netinet/in.h"
-#if defined(AFS_SGI_ENV)
-#include "afs/sysincludes.h"
-#endif
-#endif
-#include "afs/afs_args.h"
-#include "afs/afs_osi.h"
-#if    (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
-#include "h/systm.h"
-#endif
-#else /* !UKERNEL */
-#include "afs/sysincludes.h"
-#endif /* !UKERNEL */
-#ifdef RXDEBUG
-#undef RXDEBUG                 /* turn off debugging */
-#endif /* RXDEBUG */
-
-#include "rx_kmutex.h"
-#include "rx/rx_kernel.h"
-#include "rx/rx_clock.h"
-#include "rx/rx_queue.h"
-#include "rx/rx.h"
-#include "rx/rx_globals.h"
-#include "afs/lock.h"
-#include "afsint.h"
-#ifdef  AFS_OSF_ENV
-#undef kmem_alloc
-#undef kmem_free
-#undef mem_alloc
-#undef mem_free
-#endif /* AFS_OSF_ENV */
+# ifndef UKERNEL
+#  ifdef RX_KERNEL_TRACE
+#   include "rx_kcommon.h"
+#  endif
+#  if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#   include "afs/sysincludes.h"
+#  else
+#   include "h/types.h"
+#   include "h/time.h"
+#   include "h/stat.h"
+#   if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+#    include "h/systm.h"
+#   endif
+#   ifdef      AFS_OSF_ENV
+#    include <net/net_globals.h>
+#   endif /* AFS_OSF_ENV */
+#   ifdef AFS_LINUX20_ENV
+#    include "h/socket.h"
+#   endif
+#   include "netinet/in.h"
+#   if defined(AFS_SGI_ENV)
+#    include "afs/sysincludes.h"
+#   endif
+#  endif
+#  include "afs/afs_args.h"
+#  if  (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
+#   include "h/systm.h"
+#  endif
+# else /* !UKERNEL */
+#  include "afs/sysincludes.h"
+# endif /* !UKERNEL */
+
+# ifdef RXDEBUG
+#  undef RXDEBUG                       /* turn off debugging */
+# endif /* RXDEBUG */
+
+# include "afs/afs_osi.h"
+# include "rx_kmutex.h"
+# include "rx/rx_kernel.h"
+# include "afs/lock.h"
 #else /* KERNEL */
 # include <sys/types.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>
-#endif /* !AFS_NT40_ENV */
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-# include "rx_user.h"
-# include "rx_clock.h"
-# include "rx_queue.h"
-# include "rx.h"
-# include "rx_globals.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"
+#include "rx_clock.h"
+#include "rx_queue.h"
+#include "rx_globals.h"
+
 #ifdef RX_LOCKS_DB
 /* rxdb_fileID is used to identify the lock location, along with line#. */
 static int rxdb_fileID = RXDB_FILE_RX_RDWR;
index b4fbbd58c18e871098266cf79fee1a425a0fddd5..85cff81508f9d61870d97350316b6f35f8213249 100644 (file)
@@ -29,6 +29,7 @@ main(int argc, char **argv)
 #include <sys/file.h>
 #include <unistd.h>
 #endif
+
 #include "rx.h"
 #include "rx_atomic.h"
 #include "rx_globals.h"
index 8fbeaf4ab86088349ffe02e740a6077861270cf6..3dfe8f09cb6081a5b41dcaef2e5827c8dc92ad4d 100644 (file)
 #include <afs/param.h>
 
 
-# include <sys/types.h>
-# include <errno.h>
-# include <signal.h>
-# include <string.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
 #ifdef AFS_NT40_ENV
 # include <WINNT/syscfg.h>
 #else
@@ -32,7 +32,7 @@
 # include <sys/ioctl.h>
 # include <unistd.h>
 #endif
-# include <fcntl.h>
+#include <fcntl.h>
 #if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
 # include <sys/syscall.h>
 #endif
@@ -57,6 +57,7 @@
 #ifndef AFS_NT40_ENV
 # include <sys/time.h>
 #endif
+
 #include "rx.h"
 #include "rx_atomic.h"
 #include "rx_globals.h"
index f88bdea071d1c5716197b9376606006def2c5d8c..4c8f72d62095a8fac6f92a4d1254b84292c6cb3e 100644 (file)
@@ -17,7 +17,6 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
 #if defined(AFS_NT40_ENV)
 
 #include <winsock2.h>
index 057f7c28144060490f581029257d709e76a02619..830c1780cacf46c6a053463050fc8986e3eb8e08 100644 (file)
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
 #include <afs/param.h>
+
+#ifndef KERNEL
 #include <string.h>
 #endif
 
index 353f5a908c84bd8ea57a8ca08ac4f1ac93669805..54dbf0069143754de784f6dce45733cd5002093e 100644 (file)
  */
 
 #include <afsconfig.h>
-#ifdef KERNEL
-#include "afs/param.h"
-#else
 #include <afs/param.h>
-#endif
 
 
 #ifdef KERNEL
 # ifndef UKERNEL
 #  include "h/types.h"
 #  include "h/uio.h"
-#  ifdef AFS_OSF_ENV
-#   include <net/net_globals.h>
-#  endif /* AFS_OSF_ENV */
 #  ifdef AFS_LINUX20_ENV
 #   include "h/socket.h"
 #  else
 #   include "rpc/types.h"
 #  endif
-#  ifdef  AFS_OSF_ENV
-#   undef kmem_alloc
-#   undef kmem_free
-#   undef mem_alloc
-#   undef mem_free
-#  endif /* AFS_OSF_ENV */
 #  ifdef AFS_LINUX22_ENV
 #   ifndef quad_t
 #    define quad_t __quad_t
 #    define u_quad_t __u_quad_t
 #   endif
 #  endif
-#  include "rx/xdr.h"
 #  include "netinet/in.h"
 # endif /* !UKERNEL */
-# include "rx/xdr.h"
-# include "rx/rx.h"
-
 #else /* KERNEL */
 # include <sys/types.h>
 # include <stdio.h>
 # ifndef AFS_NT40_ENV
 #  include <netinet/in.h>
 # endif
-# include "rx.h"
-# include "xdr.h"
 #endif /* KERNEL */
 
+#include "rx.h"
+#include "xdr.h"
+
 /* Static prototypes */
 #ifdef AFS_XDR_64BITOPS
 static bool_t xdrrx_getint64(XDR *axdrs, long *lp);