]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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 c5ff5d1c49793bdc821c0b3666b0934f57527104..8ede547a57ddb320f9507f9b68de9063121eebb4 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 b15408cd694867e87ce31d5b34092e3d8155b842..d1c54d3b6f05432e2f56bc7860296e82f4dbd39c 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 a2399ce855839c9486e5f3cbc4142b27a1f3454b..17503b0a2ec70878079ee7dfa7407c651f3be787 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 25c2e37facd48a167d109fdaeebbc27279e72e6b..482b6ea7aaedc0d74a6ac42322fc0ef9f2b6a74c 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 e5032bb74cfaed981982679ed607b3a17f4e273f..bb65edacce8da025c0b5654465c66065f7d0d72d 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 a53f4cbba8bf327e20af81fe6d29403c45a9ce03..4c32a0d30b16ba220b3768f757823a49adf62636 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 585d6ebdf2970007d145a5eb2b82bc5da5faa5db..3e884f25608e0ba23b25f19eb6740256212cd083 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <afs/auth.h>
 #include <rx/rxkad.h>
-#include <errno.h>
 
 #include "ktc.h"
 #include "token.h"
index b8552b6caae12c489cc35d12aca73eb7014679fb..b8f81662e7e6f2592261a3d3694ecf9dafa74dd6 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 46c965453f3268cef0271af882eca7a512c96279..3372d271fdfe10209b4909dabbc4f214853cf351 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"