libwp: Tidy header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 25 Mar 2011 19:36:35 +0000 (19:36 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 2 Apr 2011 19:40:36 +0000 (12:40 -0700)
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.

Change-Id: I4952f8d115d38a3bd1dfe86478cd4a30f533e86f
Reviewed-on: http://gerrit.openafs.org/4386
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 files changed:
acinclude.m4
src/lwp/fasttime.c
src/lwp/iomgr.c
src/lwp/lock.c
src/lwp/lwp.c
src/lwp/lwp_nt.c
src/lwp/preempt.c
src/lwp/process.c
src/lwp/rw.c
src/lwp/threadname.c
src/lwp/timer.c
src/lwp/waitkey.c

index 7452cbc..b7b0333 100644 (file)
@@ -1254,6 +1254,7 @@ AC_CHECK_HEADERS([ \
                   sys/pag.h \
                   sys/param.h \
                   sys/resource.h \
+                  sys/select.h \
                   sys/statfs.h \
                   sys/statvfs.h \
                   sys/socket.h \
index 24e9751..0230184 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <sys/timeb.h>
-#include <winsock2.h>
-#else
-#include <sys/time.h>
-#include <sys/file.h>
-#endif
 #include <afs/afsutil.h>
 
 int ft_debug;
index 561b07f..b0148ea 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#include <malloc.h>
 extern void lwp_abort(void);
-#else
-#include <unistd.h>            /* select() prototype */
-#include <sys/types.h>         /* fd_set on older platforms */
-#include <sys/time.h>          /* struct timeval, select() prototype */
-#ifndef FD_SET
-# include <sys/select.h>       /* fd_set on newer platforms */
-#endif
-#include <sys/file.h>
 #endif /* AFS_NT40_ENV */
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
 #include "lwp.h"
 #include "timer.h"
-#include <signal.h>
-#include <errno.h>
-#ifdef AFS_SUN5_ENV
-#include <fcntl.h>
-#endif
 
 typedef unsigned char bool;
 #define FALSE  0
index 57c0617..d34bfb4 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
+
 #ifdef AFS_PTHREAD_ENV
 #include <afs/afs_assert.h>
 /* can't include this in lwp, rx hasn't built yet */
 
-#include <roken.h>
 #include <rx/rx.h>
 #else
 #include <assert.h>
@@ -37,7 +38,6 @@
 
 #include "lwp.h"
 #include "lock.h"
-#include <stdio.h>
 
 #define FALSE  0
 #define TRUE   1
index 3e1290b..d7e599f 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#include <stdlib.h>
-#include <stdio.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#include <time.h>
+#include <roken.h>
 
 /* allocate externs here */
 #define  LWP_KERNEL
 #include "lwp.h"
+
 #ifdef AFS_AIX32_ENV
 #include <ulimit.h>
 #include <sys/errno.h>
 #pragma alloca
 int setlim(int limcon, uchar_t hard, int limit);
 #endif
-#ifdef AFS_SGI64_ENV
-extern char *getenv();
-#include <time.h>
-#endif
-#include <string.h>
 
 #ifndef AFS_ARM_LINUX20_ENV
 #if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
index b2f9711..147a91a 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <stdio.h>
-#include <stdlib.h>
 #include <afs/afsutil.h>
 #include "lwp.h"
 
index 0ca9b5f..d9e9ec0 100644 (file)
@@ -16,6 +16,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
 
 #include "lwp.h"
@@ -38,8 +39,6 @@ PRE_EndPreempt(void)
 }
 
 #else
-#include <sys/time.h>
-#include <signal.h>
 #ifdef HAVE_UCONTEXT_H
 #include <ucontext.h>
 #endif
index bd18de6..75a7105 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#include <stdio.h>
-#include <assert.h>
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <roken.h>
 
+#include <assert.h>
 
 #include "lwp.h"
 
index 3710db4..03a14cd 100644 (file)
@@ -17,15 +17,7 @@ Created: 11/1/83, J. Rosenberg
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#ifdef AFS_NT40_ENV
-#include <malloc.h>
-#include <stdlib.h>
-#else
-#include <sys/time.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
+#include <roken.h>
 
 #include "lwp.h"
 #include "lock.h"
index 62a967e..8c7e055 100644 (file)
@@ -22,8 +22,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#include <string.h>
+#include <roken.h>
 
 #if defined(AFS_PTHREAD_ENV)
 #include <pthread.h>
index 90fe67e..cad63b4 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <sys/time.h>
-#endif
-#include <stdlib.h>
+#include <roken.h>
 
 #define _TIMER_IMPL_
 #include "timer.h"
index 79b968e..11ef20b 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
-#include <stdio.h>
 #ifdef HAVE_STDIO_EXT_H
 #include <stdio_ext.h>
 #endif
-#include <sys/types.h>
+
 #ifdef AFS_NT40_ENV
-#include <time.h>
 #include <conio.h>
-#include <assert.h>
-#else
-#include <sys/time.h>
-#include <unistd.h>
 #endif
-#include <string.h>
+
 #include "lwp.h"
 
 #define LWP_KEYSTROKE_DELAY   250      /* 250ms. Must be < 1000 */