aklog: Tidy header includes
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 24 Mar 2011 15:58:19 +0000 (15:58 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 27 Mar 2011 05:17:56 +0000 (22:17 -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 pwd.h to the list of headers that we check for in configure,
and that roken will include if they are available

Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1
Reviewed-on: http://gerrit.openafs.org/4303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4
src/aklog/aklog.c
src/aklog/asetkey.c
src/aklog/klog.c
src/aklog/krb_util.c
src/aklog/linked_list.c
src/aklog/skipwrap.c

index a58f396..ff01db4 100644 (file)
@@ -1224,6 +1224,7 @@ AC_CHECK_HEADERS([ \
                   ncurses.h \
                   netdb.h \
                   netinet/in.h \
+                  pwd.h \
                   regex.h \
                   security/pam_modules.h \
                   signal.h \
index 44c4554..b724447 100644 (file)
  */
 
 #include <afsconfig.h>
+#include <afs/param.h>
+#include <afs/stds.h>
 
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#include <errno.h>
-
-#include <sys/stat.h>
-#include <fcntl.h>
+#include <roken.h>
 
-#include <sys/param.h>
-#include <sys/errno.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <pwd.h>
+#include <ctype.h>
 
 #include <afs/stds.h>
 #include <afs/ktc.h>
@@ -77,7 +57,6 @@
 #include <afs/com_err.h>
 #endif
 
-#include <afs/param.h>
 #ifdef AFS_SUN5_ENV
 #include <sys/ioccom.h>
 #endif
 #define AKLOG_BADPATH 6
 #define AKLOG_MISC 7
 
-#ifndef NULL
-#define NULL 0
-#endif
-
 #ifndef TRUE
 #define TRUE 1
 #endif
index 416d1d6..2645027 100644 (file)
@@ -7,20 +7,11 @@
  */
 
 #include <afsconfig.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif /* HAVE_MEMORY_H */
-#include <string.h>
-
+#include <afs/param.h>
 #include <afs/stds.h>
+
+#include <roken.h>
+
 #include <krb5.h>
 
 #ifndef HAVE_KERBEROSV_HEIM_ERR_H
index b6defa4..a447c51 100644 (file)
@@ -9,30 +9,20 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
-
 #include <afs/stds.h>
-#include <sys/types.h>
-#include <rx/xdr.h>
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#endif
-#include <string.h>
-#include <errno.h>
 
+#include <roken.h>
+
+#include <rx/xdr.h>
 #include <lock.h>
 #include <ubik.h>
-
-#include <stdio.h>
-#include <pwd.h>
 #include <afs/com_err.h>
 #include <afs/auth.h>
 #include <afs/afsutil.h>
 #include <afs/cellconfig.h>
-#ifdef AFS_RXK5
-#include "rxk5_utilafs.h"
-#endif
 #include <afs/ptclient.h>
 #include <afs/cmd.h>
+
 #include <krb5.h>
 
 #ifdef HAVE_KRB5_CREDS_KEYBLOCK
index f256803..be47e68 100644 (file)
  */
 
 #include <afsconfig.h>
-
-#if 0
-#include <kerberosIV/mit-copyright.h>
-#endif
 #include <afs/stds.h>
+
+#include <roken.h>
+
 #include "aklog.h"
 #include <krb5.h>
 
@@ -24,7 +23,6 @@
 
 #include <afs/cellconfig.h>
 
-#include <string.h>
 #include <ctype.h>
 
 #define S_AD_SZ sizeof(struct sockaddr_in)
index 7fd5a79..978ed44 100644 (file)
@@ -8,15 +8,11 @@
  */
 
 #include <afsconfig.h>
+#include <afs/param.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "linked_list.h"
+#include <roken.h>
 
-#ifndef NULL
-#define NULL 0
-#endif
+#include "linked_list.h"
 
 #ifndef TRUE
 #define TRUE 1
index 75c63fd..7c00dcb 100644 (file)
@@ -31,7 +31,9 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
-#include <stdio.h>
+
+#include <roken.h>
+
 #include "aklog.h"
 #include <krb5.h>
 #include "skipwrap.h"