auth: Tidy header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 24 Mar 2011 19:56:35 +0000 (19:56 +0000)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 28 Mar 2011 12:51:40 +0000 (05:51 -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.

Change-Id: I2afd32d86b40b84c14f8a6021a583b6a4888780c
Reviewed-on: http://gerrit.openafs.org/4321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/auth/authcon.c
src/auth/cellconfig.c
src/auth/copyauth.c
src/auth/ktc.c
src/auth/ktc_nt.c
src/auth/setkey.c
src/auth/token.c
src/auth/userok.c
src/auth/writeconfig.c

index c5ff5d1..8ede547 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
 
 # pragma GCC diagnostic warning "-Wdeprecated-declarations"
 #endif
 
-#include <afs/stds.h>
-#include <afs/pthread_glock.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <sys/file.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#endif
-#include <string.h>
-#include <stdio.h>
-
 #define HC_DEPRECATED
 #include <hcrypto/des.h>
 
 #include <rx/rxkad.h>
 #include <rx/rx.h>
 
+#include <afs/pthread_glock.h>
+
 #include "cellconfig.h"
 #include "keys.h"
 #include "ktc.h"
index b15408c..d1c54d3 100644 (file)
@@ -9,42 +9,23 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
 
-#include <afs/stds.h>
-#include <afs/pthread_glock.h>
-#include <sys/types.h>
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
 #include <sys/utime.h>
-#include <io.h>
 #include <WINNT/afssw.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/file.h>
-#include <sys/time.h>
+#endif
+
 #include <ctype.h>
-#include <arpa/nameser.h>
+
 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
 #include <arpa/nameser_compat.h>
 #endif
-#include <resolv.h>
-#endif /* AFS_NT40_ENV */
+
+#include <afs/pthread_glock.h>
 #include <afs/afsint.h>
-#include <errno.h>
-#include <ctype.h>
-#include <time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #include <rx/rxkad.h>
 #include <rx/rx.h>
 
index a2399ce..17503b0 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
+
+#include <afs/afsutil.h>
 
-#include <string.h>
-#include <sys/types.h>
 #include "auth.h"
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#endif
 #include "cellconfig.h"
-#include <afs/afsutil.h>
 
 #include "AFS_component_version_number.c"
 
index 25c2e37..482b6ea 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-#if defined(UKERNEL)
-#include "afsincludes.h"
-#endif
+#include <roken.h>
 
-#ifdef AFS_SUN5_ENV
-#include <unistd.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
 #include <afs/stds.h>
 #include <afs/pthread_glock.h>
-#include <sys/types.h>
 #include <ctype.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <afs/vice.h>
+
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
+#if defined(UKERNEL)
+#include "afsincludes.h"
+#endif
+
 #ifdef AFS_AIX_ENV
 #include <sys/lockf.h>
 #ifdef AFS_AIX51_ENV
 #endif
 #endif
 #endif
+
 #ifdef HAVE_CRT_EXTERNS_H
 #include <crt_externs.h>
 #endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+
+#include <afs/vice.h>
 #include <afs/auth.h>
 #include <afs/venus.h>
 #include <afs/afsutil.h>
@@ -55,8 +49,6 @@
 #include <afs/sys_prototypes.h>
 #endif
 
-#include "token.h"
-
 #if defined(AFS_LINUX26_ENV)
 #include <sys/syscall.h>
 #if defined(SYS_keyctl)
 #endif
 #endif
 
-/* For malloc() */
-#include <stdlib.h>
+#include "token.h"
 #include "ktc.h"
 
-#ifdef notdef
-/* AFS_KERBEROS_ENV is now conditionally defined in the Makefile */
-#define AFS_KERBEROS_ENV
-#endif
-
 #ifdef AFS_KERBEROS_ENV
-#include <fcntl.h>
-#include <sys/file.h>
 #include <afs/cellconfig.h>
 static char lcell[MAXCELLCHARS];
 
index e5032bb..bb65eda 100644 (file)
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
 
-#include <afs/stds.h>
-#include <stdio.h>
-#include <afs/pthread_glock.h>
-#include <sys/types.h>
 #include <ctype.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <errno.h>
+
+#include <afs/pthread_glock.h>
 #include <rpc.h>
 #include <afs/smb_iocons.h>
 #include <afs/pioctl_nt.h>
index a53f4cb..4c32a0d 100644 (file)
 
 #include <roken.h>
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
 #ifdef AFS_NT40_ENV
-#include <winsock2.h>
 #include <WINNT/afsreg.h>
 #include <WINNT/afsevent.h>
 #endif
-#include <string.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
+
 #include <rx/rxkad.h>
 #include "cellconfig.h"
 #include "keys.h"
index 585d6eb..3e884f2 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <afs/auth.h>
 #include <rx/rxkad.h>
-#include <errno.h>
 
 #include "ktc.h"
 #include "token.h"
index b8552b6..b8f8166 100644 (file)
@@ -9,29 +9,13 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
-#include "base64.h"
 
-#include <afs/stds.h>
-#include <afs/pthread_glock.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#include <fcntl.h>
-#include <io.h>
-#else
-#include <sys/file.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <unistd.h>
-#endif
-#include <sys/stat.h>
-#include <stdlib.h>            /* for realpath() */
-#include <errno.h>
-#include <string.h>
 #include <ctype.h>
 
+#include <afs/pthread_glock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <rx/rx_identity.h>
@@ -43,6 +27,7 @@
 #include <krb.h>
 #endif
 
+#include "base64.h"
 #include "auth.h"
 #include "cellconfig.h"
 #include "keys.h"
index 46c9654..3372d27 100644 (file)
 
 #include <afs/pthread_glock.h>
 #include <afs/afsutil.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#include <fcntl.h>
-#include <io.h>
-#else
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#endif
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #include <rx/rxkad.h>
+
 #include "cellconfig.h"
 #include "keys.h"