]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser: Tidy header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 24 Mar 2011 19:11:15 +0000 (19:11 +0000)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 28 Mar 2011 01:12:59 +0000 (18:12 -0700)
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.

Also, add sys/uio.h to the list of libraries that we check for.

Change-Id: I03d9c143db42a1ec415ab5624e2cbede0d34e310
Reviewed-on: http://gerrit.openafs.org/4318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 files changed:
acinclude.m4
src/volser/common.c
src/volser/dumpstuff.c
src/volser/lockprocs.c
src/volser/physio.c
src/volser/restorevol.c
src/volser/vol-dump.c
src/volser/vol_split.c
src/volser/volmain.c
src/volser/volprocs.c
src/volser/voltrans.c
src/volser/vos.c
src/volser/vsprocs.c
src/volser/vsutils.c

index 6ed38edb35df3d57419503be22518ea117db9bbb..8e49656af9f6e412032af0af32b43d37c095764d 100644 (file)
@@ -1253,6 +1253,7 @@ AC_CHECK_HEADERS([ \
                   sys/sysctl.h \
                   sys/time.h \
                   sys/types.h \
+                  sys/uio.h \
                   sys/un.h \
                   sys/vfs.h \
                   syslog.h \
index 4eccac4da603dc217b45f4b4d7aeeb7ec3e0211b..74cf8ba9ad12fab9b1ddd9601312d66ffef5e302 100644 (file)
@@ -12,9 +12,6 @@
 
 #include <roken.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <afs/afsutil.h>
 #include <afs/com_err.h>
 
index 855debb351276504458d1aa88d187c489ab2324e..11e07450bf82800b2e880be60bcd647fac2ce92b 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
 #include <ctype.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#else
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/uio.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#endif
-#include <sys/stat.h>
+
 #include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/vnode.h>
 #include <afs/volume.h>
 #include <afs/partition.h>
-#include "dump.h"
 #include <afs/daemon_com.h>
 #include <afs/fssync.h>
 #include <afs/acl.h>
 #include <afs/com_err.h>
 #include <afs/vol_prototypes.h>
+
+#include "dump.h"
 #include "volser.h"
 #include "volint.h"
 #include "dumpstuff.h"
index 5c92ec602ba9e3a31de4d8324dafe396df81dedf..e3f6a132a568f7772f5ee24a91fc5074c0389e6c 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#endif
-#include <string.h>
 #include <afs/voldefs.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/vlserver.h>
 #include <afs/nfs.h>
 #include <afs/afsint.h>
+
 #include "volint.h"
 #include "volser.h"
 #include "lockdata.h"
-
 #include "vsutils_prototypes.h"
 #include "lockprocs_prototypes.h"
 
index 9baf650c70fb470591df756494850b4d4823e232..b988793e0239ef00c6ddc2fd42a6d5e512ddd110 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#else
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#endif
-#include <string.h>
-#ifdef AFS_SUN5_ENV
-#include <sys/fcntl.h>
-#endif
-#include <errno.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
-#include <stdio.h>
 #include <afs/afsint.h>
 #include <afs/nfs.h>
 #include <afs/afs_assert.h>
 #include <afs/dir.h>
 #include <afs/ihandle.h>
+
 #include "vol.h"
 #include "physio.h"
 
index 700173730d57f3c3567f6c588e09140ddd616546..c4f681a12520f8fe4f1c27086e5347a2fc37ff86 100644 (file)
 #include <afs/ihandle.h>
 #include <afs/vnode.h>
 #include <afs/volume.h>
-#include "volint.h"
-#include "dump.h"
 #include <afs/cmd.h>
 
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <stdio.h>
-#include <errno.h>
-#include <netinet/in.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <string.h>
-
+#include "volint.h"
+#include "dump.h"
 
 char rootdir[MAXPATHLEN];
 char mntroot[MAXPATHLEN];
index eb561f167c37906aa208c887ba816745dccc4615..1cf127eef9e94834b11a366944cf4a2158f51b7e 100644 (file)
 #include <roken.h>
 
 #include <ctype.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <time.h>
-#include <io.h>
-#else
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/time.h>
-#endif
-#include <afs/cmd.h>
 
+#include <afs/cmd.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/nfs.h>
 #include <afs/dir.h>
 #include <afs/com_err.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef _AIX
-#include <time.h>
-#endif
-
-#include <dirent.h>
-
 #include "volser.h"
 #include "volint.h"
 #include "dump.h"
index cb3196dffb300ead92c58e283d24f426fc500f59..9bb5d558ac0f1fa18050bb0e9397826443d1295b 100644 (file)
@@ -8,31 +8,14 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
-#include <sys/types.h>
-#include <stdio.h>
-#include <afs/afs_assert.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <windows.h>
-#include <winbase.h>
-#include <io.h>
-#include <time.h>
-#else
+#include <roken.h>
+
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
 #endif
-#endif
-#include <errno.h>
-#include <sys/stat.h>
 
+#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
+#include <afs/afs_assert.h>
 #include <afs/dir.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
@@ -45,6 +28,7 @@
 #include <afs/volume.h>
 #include <afs/partition.h>
 #include <afs/viceinode.h>
+
 #include "vol.h"
 #include "volint.h"
 #include "volser.h"
index f90b020b835970a66f384d65da9b28742d1327ed..49ab4610cf67efe55b379901594fd0ea4e5b3498 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
-#include <string.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
 #ifdef AFS_NT40_ENV
-#include <time.h>
-#include <fcntl.h>
 #include <windows.h>
 #include <WINNT/afsevent.h>
-#else
-#include <sys/time.h>
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <unistd.h>
 #endif
+
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <stdio.h>
-#include <signal.h>
 #include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <afs/keys.h>
 #include <afs/dir.h>
 #include <ubik.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <errno.h>
 #include <afs/audit.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
+
 #include "volser.h"
 #include "volint.h"
 #include "volser_internal.h"
index 012a8c3e18c93d347224ff00f3eeb87a6b7f5b92..875f9f6fcf491acd367be9b8fb848c6f0b20a9b4 100644 (file)
 
 #include <roken.h>
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include <errno.h>
-#ifdef AFS_NT40_ENV
-#include <stdlib.h>
-#include <fcntl.h>
-#include <winsock2.h>
-#else
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#endif
-
-#include <dirent.h>
-#include <sys/stat.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <rx/rxkad.h>
 #include <afs/afsint.h>
-#include <signal.h>
 #include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
index 3a80c56205e17a45f73424ddb97aab1d4d16e445..10d19bfdf7192343ad53b9fa27ab9fb6d6d0c28b 100644 (file)
 
 #ifdef AFS_NT40_ENV
 #include <afs/afsutil.h>
-#else
-#include <sys/time.h>
 #endif
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <winsock2.h>
-#else
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#endif
-#include <dirent.h>
-#include <sys/stat.h>
 #include <afs/afsint.h>
-#include <signal.h>
 #include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
index b74e71ae84165452b05f7013001efaaf4bc6383f..b9cbc82e3e6f3a0da9a0d51f1611f811e038b5a4 100644 (file)
 # pragma GCC diagnostic warning "-Wimplicit-function-declaration"
 #endif
 
-#include <sys/types.h>
-#include <string.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
 #ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <io.h>
-#include <winsock2.h>
 #include <WINNT/afsreg.h>
-#else
-#include <sys/time.h>
-#include <sys/file.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
 #endif
-#include <sys/stat.h>
+
 #ifdef AFS_AIX_ENV
 #include <sys/statfs.h>
 #endif
-#include <errno.h>
 
 #include <lock.h>
 #include <afs/stds.h>
@@ -62,9 +47,6 @@
 #include "dump.h"
 #include "lockdata.h"
 
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#endif
 #include "volser_internal.h"
 #include "volser_prototypes.h"
 #include "vsutils_prototypes.h"
index 5fdaa8ed67a36719cafaa7ec9529ce4ba9026987..ef6ef757d553147e4ab3360398db5a4b615e4831 100644 (file)
 #include <afs/procmgmt.h>      /* signal(), kill(), wait(), etc. */
 #include <roken.h>
 
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
 #ifdef AFS_AIX_ENV
 #include <sys/statfs.h>
 #endif
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <winsock2.h>
-#else
-#include <sys/file.h>
-#include <netinet/in.h>
-#endif
 
 #include <lock.h>
 #include <afs/voldefs.h>
@@ -51,7 +40,6 @@
 #endif
 #include <afs/vnode.h>
 #include <afs/volume.h>
-#include <errno.h>
 #define ERRCODE_RANGE 8                /* from error_table.h */
 #define        CLOCKSKEW   2           /* not really skew, but resolution */
 #define CLOCKADJ(x) (((x) < CLOCKSKEW) ? 0 : (x) - CLOCKSKEW)
index 80ac4821fe96598f9b1a0862c6e0fea87f6633ab..8db74991dc17edf4dc868745ad42e4366a355fd3 100644 (file)
@@ -9,27 +9,15 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
 
-#include <afs/stds.h>
-#include <string.h>
 #include <ctype.h>
-#ifdef AFS_NT40_ENV
-#include <fcntl.h>
-#include <winsock2.h>
-#else
-#include <sys/types.h>
-#include <sys/file.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#endif /* AFS_NT40_ENV */
-#include <sys/stat.h>
 #ifdef AFS_AIX_ENV
 #include <sys/statfs.h>
 #endif
 
-#include <errno.h>
 #include <lock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
@@ -42,6 +30,7 @@
 #include <afs/afsint.h>
 #include <afs/cmd.h>
 #include <rx/rxkad.h>
+
 #include "volser.h"
 #include "volint.h"
 #include "lockdata.h"