Add system headers
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sat, 11 Jul 2009 17:54:15 +0000 (18:54 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 12 Jul 2009 23:49:32 +0000 (17:49 -0600)
There are a number of places in the tree which are missing system
headers such as <unistd.h> <ctype.h> and <dirent.h>. Add these.

Reviewed-on: http://gerrit.openafs.org/62
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

20 files changed:
src/afs/UKERNEL/afs_usrops.c
src/auth/cellconfig.c
src/auth/ktc.c
src/gtx/input.c
src/libadmin/pts/afs_ptsAdmin.c
src/libadmin/test/vos.c
src/rx/rx_pthread.c
src/rx/rx_user.c
src/rxkad/rxkad_client.c
src/rxkad/ticket.c
src/util/hostparse.c
src/viced/callback.c
src/vol/clone.c
src/vol/daemon_com.c
src/vol/fssync-server.c
src/vol/nuke.c
src/vol/partition.c
src/vol/purge.c
src/volser/vol_split.c
src/volser/volmain.c

index 3c7bfdc..94f7c89 100644 (file)
 
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include <net/if.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <dirent.h>
+
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs_usrops.h"
 #include "afs/afs_stats.h"
index 9f6bef6..72fa3d0 100644 (file)
@@ -19,6 +19,7 @@
 #include "des/des.h"
 #include "rx/rxkad.h"
 #include <netdb.h>
+#include <ctype.h>
 #else /* UKERNEL */
 #include <sys/types.h>
 #ifdef AFS_NT40_ENV
@@ -32,6 +33,7 @@
 #include <netdb.h>
 #include <sys/file.h>
 #include <sys/time.h>
+#include <ctype.h>
 #ifdef AFS_AFSDB_ENV
 #include <arpa/nameser.h>
 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
index 01ec233..6d26750 100644 (file)
@@ -27,6 +27,7 @@
 #include "afs/venus.h"
 #include "afs/pthread_glock.h"
 #include "afs/dirpath.h"
+#include <ctype.h>
 
 #if !defined(min)
 #define min(a,b) ((a)<(b)?(a):(b))
index 7411440..b905073 100644 (file)
@@ -10,6 +10,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <stdlib.h>
 
 #ifdef AFS_HPUX_ENV
 #include <sys/types.h>
index c33b293..e671f95 100644 (file)
@@ -12,6 +12,7 @@
 
 
 #include <stdio.h>
+#include <ctype.h>
 #include <afs/stds.h>
 #include <rx/rx.h>
 #include <rx/rxstat.h>
index ea09921..0d5aa46 100644 (file)
@@ -18,6 +18,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <afs/afsutil.h>
+#include <unistd.h>
 #endif
 
 
index d0cd331..40507fb 100644 (file)
@@ -31,6 +31,7 @@
 # include <net/if.h>
 # include <sys/ioctl.h>
 # include <sys/time.h>
+# include <unistd.h>
 #endif
 #include <sys/stat.h>
 #include <rx/rx.h>
index 78c992b..8049bb6 100644 (file)
@@ -28,6 +28,7 @@
 # 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) 
index 26ef6df..150efd7 100644 (file)
@@ -50,6 +50,7 @@
 #include <winsock2.h>
 #else
 #include <netinet/in.h>
+#include <unistd.h>
 #endif
 #include <rx/rx.h>
 #include <rx/xdr.h>
index 4e0864b..7b63929 100644 (file)
@@ -226,7 +226,7 @@ tkt_MakeTicket(char *ticket, int *ticketLen, struct ktc_encryptionKey *key,
        return -1;
 
     /* encrypt ticket */
-    if (code = key_sched(key, schedule.schedule)) {
+    if ((code = key_sched(key, schedule.schedule))) {
        printf("In tkt_MakeTicket: key_sched returned %d\n", code);
        return RXKADBADKEY;
     }
index b68d714..86361f6 100644 (file)
@@ -19,6 +19,7 @@
 #include "afs/sysincludes.h"
 #include "afs/afsutil.h"
 #include <netdb.h>
+#include <ctype.h>
 #else /* UKERNEL */
 #include <stdio.h>
 #include <sys/types.h>
index 984a6cf..7860e49 100644 (file)
@@ -95,6 +95,7 @@
 #else
 #include <sys/time.h>
 #include <sys/file.h>
+#include <unistd.h>
 #endif
 #include <afs/assert.h>
 
index b848a77..ea32812 100644 (file)
@@ -35,6 +35,7 @@
 #else
 #include <sys/file.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 #include <string.h>
 #include <errno.h>
index 28bcf52..5c3d801 100644 (file)
@@ -33,6 +33,7 @@
 #include <netinet/in.h>
 #include <netdb.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 #include <errno.h>
 #include <assert.h>
index ef60420..d596056 100644 (file)
@@ -55,6 +55,7 @@
 #include <netinet/in.h>
 #include <netdb.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 #include <errno.h>
 #ifdef AFS_PTHREAD_ENV
index fb6df1b..f1de4d1 100644 (file)
 #else
 #include <strings.h>
 #endif
+#ifndef AFS_NT40_ENV
+#include <unistd.h>
+#endif
+
 #include <afs/afsutil.h>
     
 #include <afs/assert.h>
index 7a10874..8542410 100644 (file)
@@ -31,6 +31,7 @@
 #else
 #include <sys/param.h>
 #include <sys/types.h>
+#include <unistd.h>
 
 #if AFS_HAVE_STATVFS || AFS_HAVE_STATVFS64
 #include <sys/statvfs.h>
index 15b871b..3248e46 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/param.h>
 #include <sys/file.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 #include <string.h>
 #include <sys/stat.h>
index f541041..8af67ea 100644 (file)
@@ -25,6 +25,7 @@
 #else
 #include <sys/file.h>
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 #ifdef HAVE_STRING_H
 #include <string.h>
index 8f40a6d..b78085e 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/time.h>
 #include <sys/file.h>
 #include <netinet/in.h>
+#include <unistd.h>
 #endif
 #include <rx/xdr.h>
 #include <afs/afsint.h>