]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Remove redundant header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 8 Sep 2011 10:26:39 +0000 (11:26 +0100)
committerDerrick Brashear <shadow@dementix.org>
Thu, 12 Apr 2012 21:14:14 +0000 (14:14 -0700)
Remove includes of system headers where roken.h already takes care of
including them. This simplifies the source tree, reduces the amount of
work done by the compiler, and ensures that all of our headers are
included with the correct guards

The list of files to edit was generated with the following script:

list=`grep include external/heimdal/roken/roken.h.in                \
         | sed -e's/#include//g' | sort | uniq`;                    \
for A in `find . -name *.c | xargs grep -l roken.h                  \
             | grep -v external/ | grep -v WINNT/`; do              \
     found=0;                                                       \
     for B in $list; do                                             \
         if grep "$B" $A > /dev/null; then                          \
              echo "$A : $B";                                       \
              found=1;                                              \
         fi;                                                        \
     done;                                                          \
     if [ $found == 1 ] ; then mvim -f $A; fi;                      \
done

Change-Id: I2edbda550a129709b1dc6860b17d6a8a7509af58
Reviewed-on: http://gerrit.openafs.org/5815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
51 files changed:
src/afsd/afsd.c
src/afsd/afsd_kernel.c
src/auth/ktc.c
src/auth/test/ktctest.c
src/auth/userok.c
src/bozo/bos.c
src/bozo/bosserver.c
src/bozo/cronbnodeops.c
src/bozo/ezbnodeops.c
src/budb/server.c
src/comerr/error_table_nt.c
src/dir/test/dtest.c
src/kauth/kaserver.c
src/kauth/klogin.c
src/kauth/user_nt.c
src/libadmin/adminutil/afs_utilAdmin.c
src/libadmin/samples/cm_list_cells.c
src/libadmin/samples/cm_local_cell.c
src/libadmin/samples/rxstat_get_peer.c
src/ptserver/display.c
src/rx/rx_trace.c
src/rx/rx_xmit_nt.c
src/rx/test/rxperf.c
src/rx/test/testclient.c
src/rx/test/testserver.c
src/rx/xdr_refernce.c
src/rxgen/rpc_main.c
src/rxkad/bg-fcrypt.c
src/rxkad/test/stress_c.c
src/rxstat/rxstat.c
src/sys/pioctl_nt.c
src/ubik/remote.c
src/update/client.c
src/usd/usd_file.c
src/usd/usd_nt.c
src/util/readdir_nt.c
src/util/serverLog.c
src/util/uuid.c
src/util/winsock_nt.c
src/venus/afsio.c
src/venus/kdump.c
src/vfsck/inode.c
src/vfsck/pass1.c
src/vfsck/proplist.c
src/vfsck/utilities.c
src/vol/listinodes.c
src/vol/ntops.c
src/vol/partition.c
src/vol/physio.c
src/vol/salvsync-client.c
src/vol/salvsync-server.c

index 0a6a99567a56d387b28b21218014f17b00ed3bc5..50e750bf74e70d1944e4ea298e805d723f15701a 100644 (file)
 #include "afsd.h"
 
 #include <afs/afsutil.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+
 #include <sys/file.h>
-#include <errno.h>
-#include <sys/time.h>
 #include <sys/wait.h>
 
 /* darwin dirent.h doesn't give us the prototypes we want if KERNEL is
 # include <dirent.h>
 #endif
 
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
 #ifdef HAVE_SYS_FS_TYPES_H
 #include <sys/fs_types.h>
 #endif
 #include <sys/fstyp.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
+#include <ctype.h>
 
-#include <netinet/in.h>
 #include <afs/afs_args.h>
 #include <afs/cellconfig.h>
-#include <ctype.h>
 #include <afs/afssyscalls.h>
 #include <afs/afsutil.h>
 #include <afs/sys_prototypes.h>
 
-#ifdef AFS_SGI61_ENV
-#include <unistd.h>
-#include <libelf.h>
-#include <dwarf.h>
-#include <libdwarf.h>
-void set_staticaddrs(void);
-#endif /* AFS_SGI61_ENV */
 #if defined(AFS_SGI62_ENV) && !defined(AFS_SGI65_ENV)
 #include <sym.h>
 #include <symconst.h>
@@ -165,7 +136,6 @@ void set_staticaddrs(void);
 
 #ifdef AFS_DARWIN_ENV
 #ifdef AFS_DARWIN80_ENV
-#include <sys/ioctl.h>
 #include <sys/xattr.h>
 #endif
 #include <CoreFoundation/CoreFoundation.h>
index 6665aae1a282fd98175f0b6711803b43937033fe..71410db0b9148ab4f183daad02407ec778d2ffcf 100644 (file)
 
 #include <assert.h>
 #include <afs/afsutil.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <sys/file.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <dirent.h>
 #include <sys/wait.h>
 
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
 #ifdef HAVE_SYS_FS_TYPES_H
 #include <sys/fs_types.h>
 #endif
 #include <sys/fstyp.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
+#include <ctype.h>
 
-#include <netinet/in.h>
+#include <afs/opr.h>
 #include <afs/afs_args.h>
 #include <afs/cellconfig.h>
-#include <ctype.h>
 #include <afs/afssyscalls.h>
 #include <afs/afsutil.h>
 
 #ifdef AFS_DARWIN_ENV
 #ifdef AFS_DARWIN80_ENV
-#include <sys/ioctl.h>
 #include <sys/xattr.h>
 #endif
 #include <mach/mach.h>
index 511c42b7d5c2667de7b3acd37e52dd7014b6c0eb..7307111b9d5224ca8b60c8efee6134d12ac3351c 100644 (file)
@@ -88,9 +88,6 @@ static char lcell[MAXCELLCHARS];
 #define BUFSIZ 4096
 #endif
 
-#ifdef AFS_HPUX_ENV
-#include <unistd.h>
-#endif
 #if    defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
 static struct flock fileWlock = { F_WRLCK, 0, 0, 0, 0, 0 };
 static struct flock fileRlock = { F_RDLCK, 0, 0, 0, 0, 0 };
@@ -1109,10 +1106,6 @@ ktc_curpag(void)
   */
 
 #if 0
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <sys/file.h>
 #include <krb.h>
 #endif
index 80508a8f478365feac117e9d97f13dbbda117196..931b2b0dd4ae5a61e0e02fd9b1c6d837d813c709 100644 (file)
 #include <afs/param.h>
 #include <roken.h>
 
-#include <stdlib.h>
 #include <stddef.h>
-#include <stdio.h>
-#include <errno.h>
 
 #include <afs/stds.h>
 #include <afs/afsutil.h>
index fff3e8ab0b969b0711730b8cdd9a92f65fd55be3..1e6f856bfbb0472e33c3489823cbb5429333cd59 100644 (file)
@@ -20,7 +20,6 @@
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <rx/rx_identity.h>
-#include <stdio.h>
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
 
index 874655ad949c23a56fe22576fa70c2e353a294db..2d54598495215379be28057e797cf75a8e50abae 100644 (file)
@@ -21,7 +21,6 @@
 #include <afs/afsutil.h>
 #include <afs/cellconfig.h>
 #include <rx/rx.h>
-#include <sys/stat.h>
 #include <rx/xdr.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
index 2b8d88de86c0e07f6d82db926163c31eae04277a..169685b35c5b056f254b895bb07f65021c7af0fb 100644 (file)
@@ -558,15 +558,7 @@ tweak_config(void)
  * It writes warning messages to the standard error output if certain
  * fundamental errors occur.
  *
- * This routine requires
- *
- * #include <sys/types.h>
- * #include <sys/stat.h>
- * #include <fcntl.h>
- * #include <unistd.h>
- * #include <stdlib.h>
- *
- * and has been tested on:
+ * This routine has been tested on:
  *
  * AIX 4.2
  * Digital Unix 4.0D
index 1d5f2af54b644a79358eea6c40e10ccfce96efe1..ad2f641d3638f0a2f92e33aa4f407c70e5d3ce9e 100644 (file)
 
 #include <ctype.h>
 
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#endif
-
 #include <lwp.h>
 #include <afs/ktime.h>
 #include <afs/afsutil.h>
index 83abdb3637cd40760fca9d0fa9691879a429ec64..d5ceab0872363f791cc8f18a86f0d7995ca988a2 100644 (file)
@@ -15,9 +15,6 @@
 
 #include <lwp.h>
 #include <rx/rx.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#endif
 
 #include <afs/afsutil.h>
 #include "bnode.h"
index e107aaafb7455304d9d4d0143e5b12b7798f2926..add09f46997551c7727ae975f61bbf491e70484e 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <roken.h>
 
-#include <fcntl.h>
-
 #ifdef AFS_NT40_ENV
 #include <WINNT/afsevent.h>
 #endif
index 822df2f95e5cc4effdcadfa4f1961495c3afcecb..06eb3e84c75c7aef0906ae90d6c62a86a1224ece 100755 (executable)
 # endif
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "internal.h"
 
 char *current_token = (char *)NULL;
@@ -73,8 +69,6 @@ typedef
 #define YYLTYPE yyltype
 #endif
 
-#include <stdio.h>
-
 #ifndef __cplusplus
 #ifndef __STDC__
 #define const
@@ -942,23 +936,15 @@ yyparse(YYPARSE_PARAM)
  *
  * For copyright info, see mit-sipb-cr.h.
  */
-#ifndef AFS_NT40_ENV
-#include <unistd.h>
-#endif
 #include <afs/param.h>
-#include <string.h>
 #include <assert.h>
 #include <ctype.h>
 #ifdef AFS_NT40_ENV
-#include <sys/types.h>
 #include <afs/afsutil.h>
-#else
-#include <sys/time.h>
 #endif
 #include <sys/timeb.h>
 #include "error_table.h"
 #include "mit-sipb-cr.h"
-#include <stdio.h>
 
 /*
  * Copyright 2000, International Business Machines Corporation and others.
index e32abddb38950ad4433e7179bcd380595e96b91d..e881c6719068713d9d12758ff40cd4b5158d638c 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <roken.h>
 
-#include <stdarg.h>
-
 #include <afs/dir.h>
 
 long fidCounter = 0;
index 4868ba0b3960a046d675fad862dc01efcbf9b269..c54bf6a82d6344da9d805fb0d8dd87e6844d3028 100644 (file)
@@ -55,7 +55,6 @@ struct afsconf_dir *KA_conf;  /* for getting cell info */
 int MinHours = 0;
 int npwSums = KA_NPWSUMS;      /* needs to be variable sometime */
 
-#include <stdarg.h>
 #if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #undef vfprintf
 #define vfprintf(stream,fmt,args) _doprnt(fmt,args,stream)
index 7fcdf40a8f5cb52be60c158c86580b7894b662f7..fa6217ec7e4e9a372ecd7ba5e22cc0131f64bdcf 100644 (file)
@@ -33,8 +33,6 @@
 #include <lastlog.h>
 #include <ttyent.h>
 
-#include <grp.h>
-
 static gid_t tty_gid(int default_gid);
 static void getloginname(struct utmp *up);
 
index b1715129b5f5c745824d738c404e4e842bfe94c9..b3aba45d1b3dc3cab1ea8d9eb61ab09e2f219c90 100644 (file)
@@ -204,14 +204,8 @@ static int krbONE = 1;
  * <mit-cpyright.h>.
  */
 
-#include <string.h>
-#include <time.h>
-
 #include "krb.h"
 
-#include <sys/types.h>
-#include <winsock2.h>
-
 static int swap_bytes;
 
 /*
index eab3c8e4d9a86dc07002b25e12ea37bd1c35853d..75c4ccbfe3a0e461c5ba79de4d93b434c9df1c1a 100644 (file)
@@ -17,7 +17,6 @@
 #include <rx/rxstat.h>
 
 #ifdef AFS_NT40_ENV
-# include <winsock2.h>
 # include <afs/krb5_nt.h>
 #endif
 
index a82c46d9f1b02d6871fd9c7babaafb1ec801e17c..b85d58c0635323a97fde28194a903e775e33b6f3 100644 (file)
@@ -19,7 +19,6 @@
 #include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
 #include <pthread.h>
 #endif
 
index 8260385a47b4b9a7d758ec373fcd701eff5dec62..9803a5ec45ae833e14823b70cca51e49ded52baa 100644 (file)
@@ -19,7 +19,6 @@
 #include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
 #include <pthread.h>
 #endif
 
index 5c9f05eabb2a8478c1b71c77421778dd5cc03d7f..fb860a082191b02d038e3085c8c3322cc211cc32 100644 (file)
@@ -49,9 +49,6 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #include <afs/bosint.h>
 #include <ubik.h>
 #include <ubik_int.h>
-#ifndef AFS_NT40_ENV
-#include <arpa/inet.h>         /* for inet_ntoa() */
-#endif
 
 void
 Usage(void)
index bc934205eb190fb9e077b703a8974ee49246d04b..eca2f9b573248d77ff8fca3e70f9d5d778926d82 100644 (file)
 
 #include <roken.h>
 
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#endif
-
 #include "ptserver.h"
 #include "display.h"
 
index dc1e10703a58833f556f0e3c6eb07221d8434a2a..d60e92896b0719ea53109e0e65173f2a9007d91a 100644 (file)
@@ -128,7 +128,6 @@ rxi_calltrace(unsigned int event, struct rx_call *call)
 }
 
 #ifdef DUMPTRACE
-#include <errno.h>
 #ifdef AFS_NT40_ENV
 #include <afs/afsutil.h>
 #endif
index a9842ad61b1368eea4505a2932d620692022ade3..86fdc687b7118bfff4f9fa74f71fbbefc3c1b22a 100644 (file)
@@ -19,7 +19,6 @@
 
 #if defined(AFS_NT40_ENV)
 # include <roken.h>
-# include <winsock2.h>
 # if (_WIN32_WINNT < 0x0501)
 #  undef _WIN32_WINNT
 #  define _WIN32_WINNT 0x0501
@@ -59,7 +58,6 @@ INT
 #include "rx_packet.h"
 #include "rx_xmit_nt.h"
 #include <malloc.h>
-#include <errno.h>
 
 
 /*
index f37ff9a8f18cdc67fe0bd33d13bc42e534311fe0..67f2418a2afc954233a3cc265ed0311bd51d5ca2 100644 (file)
@@ -43,42 +43,12 @@ nn * We are using getopt since we want it to be possible to link to
 #include <afs/param.h>
 #include <roken.h>
 
-#include <stdarg.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#include <winsock2.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <time.h>
-#else
-#include <sys/time.h>
-#include <sys/socket.h>
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
 #endif
+
 #include <assert.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <signal.h>
-#ifdef HAVE_ERRX
-#include <err.h>               /* not stricly right, but if we have a errx() there
-                                * is hopefully a err.h */
-#endif
+
 #include <rx/rx.h>
 #include <rx/rx_null.h>
 #include <rx/rx_globals.h>
index 949a8bc2d05463a448648e3ea3c2da98ba32e322..90c315e83fcc7a0631de85d93526238ffa2ade41 100644 (file)
 #include <afs/param.h>
 #include <roken.h>
 
-#include <sys/types.h>
-#include <stdio.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#include <winsock2.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#else
-#include <netinet/in.h>
-#include <netdb.h>
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
 #endif
-#include <sys/stat.h>
-#include <signal.h>
 
 #include <afs/opr.h>
 #include <rx/rx_clock.h>
 #include <rx/rx.h>
 #include <rx/rx_globals.h>
 #include <rx/rx_null.h>
-#include <errno.h>
 #include <afs/afsutil.h>
 
 #ifndef osi_Alloc
@@ -421,7 +409,6 @@ Quit(char *msg)
  *
  * Open file descriptors until file descriptor n or higher is returned.
  */
-#include <sys/stat.h>
 void
 OpenFD(int n)
 {
index f04e07cf5ed0dcb2a0895e0c6f8fe52445b894cf..3eae762ed45a19b41729293753ce40474ee48518 100644 (file)
 #include <afs/param.h>
 #include <roken.h>
 
-#include <sys/types.h>
-#include <stdio.h>
-#ifdef AFS_NT40_ENV
-#include <io.h>
-#include <winsock2.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#else
-#include <netinet/in.h>
-#include <netdb.h>
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <sys/time.h>
 #endif
-#include <signal.h>
-#include <sys/stat.h>
 
 #include <afs/opr.h>
 #include <rx/rx_clock.h>
@@ -342,7 +330,6 @@ Quit(char *msg)
  *
  * Open file descriptors until file descriptor n or higher is returned.
  */
-#include <sys/stat.h>
 void
 OpenFD(int n)
 {
index 09c5522e47a11d0666e480490cc264e0ac5db0a6..61d4f936ae7c697c0929f706aeaec4cbd6886f7d 100644 (file)
@@ -29,9 +29,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#ifndef KERNEL
-# include <roken.h>
-#endif
+#include <roken.h>
 
 #include "rx.h"
 
@@ -48,8 +46,6 @@
  */
 
 #include "xdr.h"
-#include <stdio.h>
-#include <string.h>
 #define LASTUNSIGNED   ((u_int)0-1)
 
 /*
index 3acc734c83cd957ed48375bbde1fd8d76ddbc868..30e5d391687dbc5731b90b59ea735ecd6d64c4d4 100644 (file)
@@ -364,7 +364,6 @@ c_output(char *infile, char *define, int extend, char *outfile, int append)
        }
        f_print(fout, "#ifdef AFS_NT40_ENV\n");
        f_print(fout, "#define AFS_RXGEN_EXPORT __declspec(dllexport)\n");
-        f_print(fout, "#include <winsock2.h>\n");
        f_print(fout, "#endif /* AFS_NT40_ENV */\n");
     }
     if (currfile && (include = extendfile(currfile, ".h"))) {
index eaf0d047dd7a0237444452408ddedeb6ece17152..936e3524479b89f6bd94eeb97bdd8ea5061504da 100644 (file)
@@ -667,11 +667,6 @@ rxkad_DecryptPacket(const struct rx_connection * rx_connection_not_used,
  * the test case. Use TEST_KERNEL to get the mangled names.
  */
 
-#include <stdio.h>
-#include <string.h>
-
-#include <time.h>
-
 const char the_quick[] = "The quick brown fox jumps over the lazy dogs.\0\0";
 
 const unsigned char key1[8] =
index f5d8d0f96f924a4e6d0c67815545f46a9fa098c1..9b6d551cd445fbccdb75807bad9aff039b1ece2c 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
 #include <afs/stds.h>
-#include <sys/types.h>
-#include <stdio.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netdb.h>
-#include <netinet/in.h>
-#endif
+
 #include <afs/com_err.h>
 #include <afs/afsutil.h>
 #include <rx/rxkad.h>
index 1234578c83b95d6746d7a3f29d8a830b03a448bc..857ec3997a441cc1214a429914bbc29edd8f254e 100644 (file)
@@ -19,8 +19,6 @@
 #include <rx/rxstat.h>
 #if defined(KERNEL) && !defined(UKERNEL)
 #include "sys/errno.h"
-#else /* KERNEL && !UKERNEL */
-#include <errno.h>
 #endif /* KERNEL && !UKERNEL */
 
 /*
index e5e4a4d1a1f846d9881abc4bdc075e52b75c50f2..13431b165193daf228349d79804064afd9a77af2 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <windows.h>
 #include <winioctl.h>
-#include <winsock2.h>
 #define SECURITY_WIN32
 #include <security.h>
 #include <nb30.h>
index f3c0b9610ae7bf0b9977ddd8f5d2b618b9f55856..339bf04b71b358e164a71f06b96a2979fec9171d 100644 (file)
 #include <afs/param.h>
 
 #include <roken.h>
+
+#include <assert.h>
+
 #include <afs/opr.h>
 #include <lock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
-#include <errno.h>
-#include <assert.h>
 #include <afs/afsutil.h>
 
 #define UBIK_INTERNALS
index a9be509a74c9a906b8d64f31d07fc6821a40d480..a5f00247c374a31d16d0a8cdf858bb6de6a5d4ad 100644 (file)
@@ -19,8 +19,6 @@
 #include <WINNT/afsevent.h>
 #include <sys/utime.h>
 #include <direct.h>
-#include <process.h>
-#include <afs/procmgmt.h>
 #endif
 
 #ifdef AFS_AIX_ENV
index f11267aac01016d1ccf089bb16274fc8541d7fea..7c51c9587a8b2bc23c32eaec0ea3a51d991f970c 100644 (file)
@@ -20,9 +20,6 @@
 #ifdef AFS_DARWIN_ENV
 #include <sys/ioccom.h>
 #endif
-#if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV) || (defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN100_ENV))
-#include <sys/ioctl.h>
-#endif
 #ifndef AFS_DARWIN100_ENV
 #include <sys/mtio.h>
 #endif
index b2e09e6d656a0d6d574de638c83232736d3b740b..8574fb9e688e1cb2b75fe6ca1cf9bd270b3f3b73 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <windows.h>
 #include <winioctl.h>
-#include <sys/stat.h>
 #include <crtdbg.h>
 
 #include <afs/errmap_nt.h>
index 3435495cd45e49aa27a7cefe412ca7eca3eeefb7..18fb4d4f81f436d73504a7c97e9c92e4a7ec3b42 100644 (file)
@@ -24,7 +24,6 @@
 #include <afs/errmap_nt.h>
 #include <windows.h>
 #include <winbase.h>
-#include <dirent.h>
 
 /* opendir() - The case insensitive version of opendir */
 DIR *
index ebe9fbca39dce32b89d2be29139ecd0a69e34b6a..08b7d828ba0cf7740782c8e451329a8e7f2e235b 100644 (file)
@@ -68,7 +68,6 @@ int serverLogSyslogFacility = LOG_DAEMON;
 char *serverLogSyslogTag = 0;
 #endif
 
-#include <stdarg.h>
 int LogLevel;
 int mrafsStyleLogs = 0;
 static int threadIdLogs = 0;
index 8946eb12cdad694c9862a847535b95205247c608..5aaff37bda46ec45721b1504d1744f56270a703b 100644 (file)
@@ -50,7 +50,6 @@
 
 # ifdef AFS_NT40_ENV
 #  include <rpc.h>
-#  include <process.h>
 # else
 #  include <net/if.h>
 #  if !defined(AFS_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
index 7418b7524bb7953e07782f4694c52949457dbf3e..5605ada4ff920dfb1303529efd7e2ee8c99bdb96 100644 (file)
@@ -15,7 +15,6 @@
 #include <roken.h>
 
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
 #include <sys/timeb.h>
 #include <afs/afsutil.h>
 
index c19ca2e38afc53b1b1b8b98f286ca433979dbf95..3f35b693938c49e8f65d48a5f6c037dd9800dde5 100644 (file)
 
 #include <roken.h>
 
-#include <stdio.h>
 #ifdef AFS_NT40_ENV
 #include <windows.h>
 #define _CRT_RAND_S
-#include <process.h>
 #include <afs/smb_iocons.h>
 #include <afs/afsd.h>
 #include <afs/cm_ioctl.h>
 #include <afs/pioctl_nt.h>
 #include <WINNT/syscfg.h>
 #else
-#include <netdb.h>
 #include <afs/afsint.h>
 #define FSINT_COMMON_XG 1
 #endif
-#include <sys/stat.h>
+
+#include <afs/opr.h>
 #include <afs/cmd.h>
 #include <afs/auth.h>
 #include <afs/vlserver.h>
 #include <afs/ihandle.h>
 #include <afs/com_err.h>
 #include <afs/afscp.h>
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
+
 #ifdef HAVE_DIRECT_H
 #include <direct.h>
 #endif
index dd1b45873c91f97c50d7ea981d0a3f9bdee27e22..3db1c06ded6faaa594ff37873e94fe12a50aa7bb 100644 (file)
@@ -106,10 +106,6 @@ struct ncp_sb_info {
 #define _KERNEL 1
 #endif
 
-#ifndef        AFS_OSF_ENV
-#include <sys/param.h>
-#endif
-
 #ifndef AFS_LINUX20_ENV
 #include <nlist.h>
 #endif
@@ -119,7 +115,6 @@ struct ncp_sb_info {
 #endif
 
 #include <afs/stds.h>
-#include <sys/types.h>
 
 #if defined(AFS_OSF_ENV)
 #define        KERNEL
@@ -128,7 +123,6 @@ struct ncp_sb_info {
 #ifdef _KERN_LOCK_H_
 #include FFFFF
 #endif
-#include <sys/time.h>
 #include <kern/lock.h>
 #include <sys/vnode.h>
 #include <arch/alpha/pmap.h>
@@ -187,10 +181,6 @@ struct vnode foo;
 #include <sys/user.h>
 #endif
 
-#ifndef AFS_LINUX20_ENV
-#include <sys/socket.h>
-#endif
-
 #ifndef AFS_LINUX26_ENV
 #include <sys/file.h>
 #endif
@@ -213,8 +203,6 @@ struct vnode foo;
 # include <netinet/in.h>       /* struct in_addr */
 #endif
 
-#include <arpa/inet.h>         /* inet_ntoa() */
-
 #if defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)
 #ifdef       AFS_SGI_ENV
 #include <sys/vnode.h>
@@ -339,7 +327,6 @@ typedef enum _spustate {    /* FROM /etc/conf/h/_types.h */
 #endif
 #endif
 #endif
-#include <signal.h>
 #endif
 
 /* AFS includes */
@@ -626,9 +613,6 @@ PrintIPAddr(int addr)
 
 #ifdef AFS_LINUX20_ENV
 /* Find symbols in a live kernel. */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #ifdef AFS_LINUX26_ENV
 #define KSYMS "/proc/kallsyms"
index eb5bc2330acadf358b7d01e1945e8d88a381df3a..d4e902c734f96e19c091493557bebf3671900537 100644 (file)
@@ -77,7 +77,6 @@
 #endif /* AFS_OSF_ENV */
 
 #include <afs/osi_inode.h>
-#include <pwd.h>
 #include "fsck.h"
 
 #ifdef AFS_SUN_ENV
index 3619b01f00488ccf1d9d7837a371531194dbfea1..bb8046a8614bd81321a377d5c8fd4045860f7d3a 100644 (file)
@@ -33,7 +33,6 @@
 #include <ufs/dir.h>
 #undef _KERNEL
 #undef _BSD
-#include <stdio.h>
 #else /* AFS_OSF_ENV */
 #ifdef AFS_VFSINCL_ENV
 #include <sys/vnode.h>
index 956afae53501176091465ee0f7a7211b6f0eb38a..95463718486609fa4819d530e2dd77b305dddfce 100644 (file)
@@ -29,7 +29,6 @@
 #undef _BSD
 
 #include <afs/osi_inode.h>
-#include <pwd.h>
 #include "fsck.h"
 
 struct prop_entry_desc {
index 242a37547146b045b2f1e13ebd3b5c7b8b0b305d..4b8dd440df10d513ecf36927cc7f01d78d37e3e7 100644 (file)
@@ -96,7 +96,6 @@ extern int isdirty;
 #ifdef AFS_SUN5_ENV
 #include <sys/mntent.h>
 #include <sys/mnttab.h>
-#include <sys/stat.h>
 #include <sys/vfstab.h>
 
 offset_t llseek();
@@ -1016,7 +1015,6 @@ mounted(name)
 #if    defined(AFS_HPUX101_ENV)
 
 #include "libfs.h"
-#include <sys/stat.h>
 #include <sys/fcntl.h>
 
 int seek_options;
index 0bf3428f40c418c4efb2bf68294faee79b55592e..da1d2dfb8f7f06177e67babdd2c3ca4dd7733c6b 100644 (file)
@@ -409,7 +409,6 @@ ginode(inum)
 #define        __ASSERT_H__
 
 #ifdef AFS_SGI_XFS_IOPS_ENV
-#include <dirent.h>
 #include <afs/xfsattrs.h>
 /* xfs_ListViceInodes
  *
index f012ca08d02f70779e85322556b3a65b4c1fa1df..1260d2a02181c8d60d66a6528f6a411467193a1f 100644 (file)
@@ -27,7 +27,6 @@
 #include "vnode.h"
 #include "volume.h"
 #include "viceinode.h"
-#include <dirent.h>
 #include <afs/errmap_nt.h>
 
 #define BASEFILEATTRIBUTE FILE_ATTRIBUTE_NORMAL
index 10041460729cb1e66c02f94d11faeb546de1dddb..0d2a5fc25fdb572bb7aa557ab9ee95445b4c3788 100644 (file)
@@ -77,7 +77,6 @@
 #endif
 #endif
 #ifdef AFS_SUN5_ENV
-#include <unistd.h>
 #include <sys/mnttab.h>
 #include <sys/mntent.h>
 #else
 #include "ntops.h"
 #else
 #include "namei_ops.h"
-#include <dirent.h>
 #endif /* AFS_NT40_ENV */
 #endif /* AFS_NAMEI_ENV */
 #include "vnode.h"
 #include "partition.h"
 
 #if defined(AFS_HPUX_ENV)
-#include <sys/types.h>
 #include <sys/privgrp.h>
 #endif /* defined(AFS_HPUX_ENV) */
 
@@ -705,8 +702,6 @@ VAttachPartitions(void)
 #endif
 
 #ifdef AFS_NT40_ENV
-#include <string.h>
-#include <sys/stat.h>
 /* VValidVPTEntry
  *
  * validate names in vptab.
index c41584de140cb4d895bbfdaaa0932f222bce94e9..674b00c3c667a5550717b5d035db8b1a31da71bf 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <errno.h>
 #include <afs/afssyscalls.h>
 #include "nfs.h"
 #include "ihandle.h"
index da60056e1b16c8cf915c1126dfdce72a566c6732..1a8c8452f7dc1e999459b3bcfa1581c8e319ee04 100644 (file)
 
 #include <roken.h>
 
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#endif
-
-#include <rx/xdr.h>
+#include <afs/opr.h>
 #include <afs/afsint.h>
 #include "nfs.h"
 #include <afs/errors.h>
index 350f4024c1301377103209ffbbe45ed6a515f0cd..67f50d148e41c8fe1d4d373bca87bc276a1877aa 100644 (file)
 
 #include <stddef.h>
 
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#endif
-
-#include <rx/xdr.h>
+#include <afs/opr.h>
 #include <afs/afsint.h>
 #include "nfs.h"
 #include <afs/errors.h>