]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Include afsconfig.h before anything else
authorAndrew Deason <adeason@sinenomine.net>
Mon, 19 Dec 2011 22:11:31 +0000 (17:11 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 20 Dec 2011 21:39:06 +0000 (13:39 -0800)
afsconfig.h can define various preprocessor symbols that can affect
how system headers behave. For example, the presence of the
_POSIX_PTHREAD_SEMANTICS symbol changes the number of arguments to
getpwnam_r on at least Solaris 8. So, we must include afsconfig.h
before including anything else, to ensure consistency.

Change-Id: I84bc73b3fada5dbc68cd355c24f2f746f2e982b3
Reviewed-on: http://gerrit.openafs.org/6387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
17 files changed:
src/afs/SOLARIS/osi_groups.c
src/afs/afsincludes.h
src/afsmonitor/afsmon-output.c
src/afsmonitor/afsmon-parselog.c
src/aklog/aklog.h
src/config/mc.c
src/kauth/test/test_date.c
src/kauth/test/test_interim_ktc.c
src/lwp/test/selclient.c
src/lwp/test/selserver.c
src/lwp/test/selsubs.c
src/mcas/gc.c
src/rx/test/kctest.c
src/rx/test/kstest.c
src/tests/create-stat.c
src/tests/snprintf.c
src/util/secutil_nt.c

index a6cd8e453985941814ea576c62eecde2e5971d6a..0e4078a4d265c365e94e938c2ddd1954fe9992cb 100644 (file)
  *
  */
 
+#include <afsconfig.h>
+#include "afs/param.h"
+
 #include <unistd.h>
 #ifdef AFS_SUN510_ENV
 #include <sys/cred.h>
 #endif
 
-#include <afsconfig.h>
-#include "afs/param.h"
-
 
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
index 1ad83aab025eff25a6dd3e3a76479b3de3b91b99..dd9284aa9cb7f932b23982dfa78e9e6ed201f85a 100644 (file)
 #ifndef AFS_INCLUDES_H
 #define AFS_INCLUDES_H 1
 
+#include <afsconfig.h>
 
 #ifdef UKERNEL
 #include <UKERNEL/afsincludes.h>
 #else
 
-#include <afsconfig.h>
 
 /* AFS based headers */
 #include "afs/stds.h"
index 67ed97aea6be37c2535d41e844988ea61a4fd933..b09ff81dff67656b840f70261dfda7363c6b5739 100644 (file)
  *
  *-------------------------------------------------------------------------*/
 
-#include <stdio.h>
-#include <time.h>
 #include <afsconfig.h>
 #include <afs/param.h>
+
+#include <stdio.h>
+#include <time.h>
 #include <string.h>
 
 
index e9b99d51c9ff3b53f5e0c65cf248168f49892438..faf7fd8f2a961a61891abe92200ee03664d904fa 100644 (file)
  *
  *-------------------------------------------------------------------------*/
 
-#include <stdio.h>
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <stdio.h>
+
 
 #include <afs/xstat_fs.h>
 #include <afs/xstat_cm.h>
index 27665b92763292570554a7a19d225021c80e9232..311828d6da85f1d0a7cf24d41f96de6ae71b61b4 100644 (file)
@@ -8,9 +8,10 @@
 #ifndef __AKLOG_H__
 #define __AKLOG_H__
 
+#include <afsconfig.h>
+
 #include <krb5.h>
 #include "linked_list.h"
-#include <afsconfig.h>
 
 #ifdef __STDC__
 #define ARGS(x) x
index 18d2efcad02032a7d4b5f8b3dc6c88439bf2917b..b457e7dcdff3d3e5e5a59826478293acc5df0249 100644 (file)
@@ -7,6 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include "afsconfig.h"
+
 #define        MAXLINELEN      1024
 #define        MAXTOKLEN       100
 #include <sys/param.h>
@@ -15,7 +17,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "afsconfig.h"
 #include <string.h>
 
 #define TOK_DONTUSE 1          /* Don't copy if match and this flag is set. */
index 56b9c5687721cbb4092e0162d7954cd5ea377219..2466a265a15e3f6760ae94f091083db698a2a561 100644 (file)
@@ -13,8 +13,8 @@
  * specifies the terms and conditions for redistribution.
  */
 
-#include <sys/param.h>
 #include <afsconfig.h>
+#include <sys/param.h>
 
 
 #include <stdio.h>
index 76bd60ec0fd2803f6642320b1215c583e0eecc05..f850ed97d3e8a492266764c1379a86197602b533 100644 (file)
@@ -9,15 +9,15 @@
 
 /* Test ktc related calls as well as some file access stuff. */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #include <errno.h>
 #include <stdio.h>
 #include <sys/file.h>
 #include <arpa/inet.h>
 #include <afs/prs_fs.h>
-#include <afsconfig.h>
-#include <afs/param.h>
-
 
 #include <afs/stds.h>
 #include <afs/com_err.h>
index 5222702b58fcc6124bd26b92535c4cbc4f81acde..254418a7f1797b89009b5b732d7bede26856aac4 100644 (file)
  * on IRIX 6.2 and 6.4.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
+
 #include <unistd.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <assert.h>
 #include <time.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
-
-
 
 #include "lwp.h"
 #include "seltest.h"
index 454012475fec9a0d63a4157947acf7a2e5e8f98d..09397a6c794ce1a8cdb9ca102b158cd3057c5320 100644 (file)
  * on IRIX 6.2 and 6.4.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
+
 #include <unistd.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <assert.h>
 #include <sys/stat.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
-
-
 
 #include "lwp.h"
 #include "seltest.h"
index f20dea47d01541a958e60c62e3391241b89f4f09..f3403a155e576487ec16ac31e27db92cb3758f28 100644 (file)
@@ -8,6 +8,10 @@
  */
 
 /* selsubs.c - common code for client and server. */
+#include <afsconfig.h>
+#include <afs/param.h>
+
+
 #include <unistd.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <assert.h>
 #include <sys/stat.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
-
-
 
 #include "lwp.h"
 #include "seltest.h"
index 369dd5c5bdc865889408c75525caf5c4181db377..53812c4834004e82b2c1018e80b6c7a83819db79 100644 (file)
@@ -34,6 +34,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -43,8 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "portable_defns.h"
 #include "gc.h"
 
-#include <afsconfig.h>
-#include <afs/param.h>
 #include <afs/afsutil.h>
 
 /*#define MINIMAL_GC*/
index 6fc0acebafd36e3185d089f099c7211b3a77d92a..abf98fc49deaea5726814e3344953553eb8e1470 100644 (file)
@@ -7,8 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include "afs/param.h"
 #include <afsconfig.h>
+#include "afs/param.h"
 
 
 #include <sys/types.h>
index 51091276590354dac857019ab93eacf8fc43708e..9c68d715755af75a777b1b05278b09e17ed507a6 100644 (file)
@@ -7,8 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include "afs/param.h"
 #include <afsconfig.h>
+#include "afs/param.h"
 
 
 #include <sys/types.h>
index 1e383a5b5a5a9f6c95e7873fc0f0df2bfc9fd475..acd12e7950c029e5264e127220c15bdbe04fd4ad 100644 (file)
  * SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include <afsconfig.h>
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 73edbc3b80875fb83a97bb354c3f4dc63f3f3a15..aaed1a7e58829fdcc47c57f717d07e24542e6e9a 100644 (file)
@@ -31,6 +31,7 @@
  * SUCH DAMAGE.
  */
 
+#include <afsconfig.h>
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -39,7 +40,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <afsconfig.h>
 
 #ifndef HAVE_VASNPRINTF
 int vasnprintf(char **ret, size_t max_sz, const char *format, va_list args);
index 83a7362d369e17cdea83858df240b4ac3542b9dd..e1d972adf03222edb76b8af58c052147a691e858 100644 (file)
@@ -9,8 +9,8 @@
 
 /* Security related utilities for the Windows platform */
 
-#include <afs/param.h>
 #include <afsconfig.h>
+#include <afs/param.h>
 #include <afs/stds.h>
 
 #include <stddef.h>