]> 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 22:21:39 +0000 (14:21 -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.

FIXES 130413

Reviewed-on: http://gerrit.openafs.org/6387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 37f537a21db6d560dd16a53ff5e0d2f0456d4c48)

Change-Id: I64970fd06af9a13d91acaf03b80a2baf224754ff
Reviewed-on: http://gerrit.openafs.org/6388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
37 files changed:
src/afs/afsincludes.h
src/afsmonitor/afsmon-output.c
src/afsmonitor/afsmon-parselog.c
src/aklog/aklog.h
src/auth/test/ktctest.c
src/bucoord/dump_sched.c
src/bucoord/server.c
src/butc/test_budb.c
src/config/mc.c
src/des/cbc_encrypt.c
src/des/des.c
src/des/new_rnd_key.c
src/des/pcbc_encrypt.c
src/des/strng_to_key.c
src/des/test/testit.c
src/des/test/verify.c
src/kauth/ka_util.c
src/kauth/test/test_date.c
src/kauth/test/test_interim_ktc.c
src/kopenafs/kopenafs.c
src/lwp/test/selclient.c
src/lwp/test/selserver.c
src/lwp/test/selsubs.c
src/mcas/gc.c
src/pam/afs_message.c
src/pam/afs_password.c
src/pam/afs_setcred.c
src/pam/afs_util.c
src/ptserver/pt_util.c
src/rx/test/kctest.c
src/rx/test/kstest.c
src/sys/icreate.c
src/uss/uss.c
src/util/secutil_nt.c
src/venus/cacheout.c
src/vol/common.c
src/vol/devname.c

index 1ad83aab025eff25a6dd3e3a76479b3de3b91b99..18bcfda8817b6c8949263a903ffa7b466c7d8dcb 100644 (file)
 #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"
 #ifdef AFS_AIX_ENV
index 67ed97aea6be37c2535d41e844988ea61a4fd933..b7a20f78834fd4b73387a7213cc600a9735387b6 100644 (file)
  *
  *-------------------------------------------------------------------------*/
 
-#include <stdio.h>
-#include <time.h>
 #include <afsconfig.h>
 #include <afs/param.h>
-#include <string.h>
 
+#include <stdio.h>
+#include <time.h>
+#include <string.h>
 
 #include <afs/xstat_fs.h>
 #include <afs/xstat_cm.h>
index e9b99d51c9ff3b53f5e0c65cf248168f49892438..80151416e9edf5c2e324270cf4a299ef069dabfb 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 3cb7a401489b7faa9d5fff4c74e75a3edc9dedee..8bfc967a15e05fdc95e47023f008a59dc8dd6e3c 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 72c461a61a4f880b5bfc3ad610c97d7566ffdd32..0b0bba41ce49c8c732f5a08915ee3cd526ba96d1 100644 (file)
@@ -9,14 +9,14 @@
 
 /* Test of the ktc_*Token() routines */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <errno.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
-
 
 #include <afs/stds.h>
 #include <afs/afsutil.h>
index 05e8983dda493d183373149f0093c3504d4ac163..0ba989fd36ffa879fe066d57a8910864faadea03 100644 (file)
  * ALL RIGHTS RESERVED
  */
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
 
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
index 1f61dbe0f2bbd66924a0aa3f0e6d9492d18b870d..b3773a394ceadad8c400138d72726715049df16c 100644 (file)
@@ -7,10 +7,10 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <sys/types.h>
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <sys/types.h>
 
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
index ce86a5db4a46757ec31b09fbcb2fbd66ef327d97..e6460072ec9687d3c9c18aa3c1cac703175d1d30 100644 (file)
@@ -7,12 +7,11 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <sys/types.h>
-#include <netinet/in.h>
-
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <sys/types.h>
+#include <netinet/in.h>
 
 #include <afs/budb_client.h>
 #include <afs/budb.h>
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 1f0d11a5857a897a7d8f83d57dec8045a81e1f12..54ac8a8e3fc5715c66aab519f9a686d2b59ad27c 100644 (file)
@@ -17,9 +17,9 @@
  * Originally written 8/85 by Steve Miller, MIT Project Athena.
  */
 
-#include "mit-cpyright.h"
 #include <afsconfig.h>
 #include <afs/param.h>
+#include "mit-cpyright.h"
 
 #ifndef KERNEL
 #include <stdio.h>
index 1072d9db24dc2b709730bc6a24db0bd2f59c1034..c6dfe589624c29097a00ef245b8cd199b84b3899 100644 (file)
  *
  * originally written by Steve Miller, MIT Project Athena
  */
-#include "mit-cpyright.h"
-
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include "mit-cpyright.h"
+
 
 #ifndef KERNEL
 #include <stdio.h>
index d91a255eb0edf81e169f6a02b1218e7d2417acda..4e986c18ec026e9349524f5b87451ed920c0438c 100644 (file)
  * without license from the U.S. Commerce department.
  */
 
-#include "mit-cpyright.h"
-
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include "mit-cpyright.h"
+
 
 #ifndef KERNEL
 #include <stdio.h>
index 563dd7de86ba02aa3625c52897bbacab26cc1a6c..0021ea07a1af2cb80ec8510c2d34c07bd78934da 100644 (file)
  * spm 8/85    MIT project athena
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include "mit-cpyright.h"
 #ifndef KERNEL
 #include <stdio.h>
 #include <string.h>
 #endif
-#include <afsconfig.h>
-#include <afs/param.h>
 #include "des.h"
 #include "des_prototypes.h"
 
index 61507494b13b04e46945fff1f6ba0cd91f540cfb..ed667e5fe0f5cd691ab8876e3e5d41f3f9bbc0c7 100644 (file)
  *     spm     8/85    MIT project athena
  */
 
-#include "mit-cpyright.h"
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include "mit-cpyright.h"
 
 #ifndef KERNEL
 #include <stdio.h>
index 3579cba346fcc6e9598e4a30f9929125d2a71a8a..81eb76ea61ff9fe89d45b8b34027978a03a3b653 100644 (file)
@@ -8,13 +8,13 @@
  *             -1 ==> error
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <mit-cpyright.h>
 #include <stdio.h>
 #include <errno.h>
 #include <des.h>
-#include <afsconfig.h>
-#include <afs/param.h>
-
 
 
 #define MIN_ARGC       0       /* min # args, not incl flags */
index 1212341e49f6659dbd195a7767b16b45bb3856f2..6bb249694434c06df7320263c72cfa39757a9659 100644 (file)
  *             -1 ==> error
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <mit-cpyright.h>
 #include <stdio.h>
 #include <errno.h>
 #include <des.h>
-#include <afsconfig.h>
-#include <afs/param.h>
-
 
 
 extern char *errmsg();
index e7e4acf9e2d468be494e5bb82a5b46e6386996c5..896e6f08eedb51fecc1316f399720d808aa9db89 100644 (file)
@@ -9,6 +9,9 @@
  *                  output of this program to be valid.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stdio.h>
@@ -16,9 +19,6 @@
 #include <string.h>
 #include <sys/file.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
-
 
 #include <lock.h>
 #include <netinet/in.h>
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..bd3f4cb4a2b24b8581688634dc2bb09ec9c4b475 100644 (file)
@@ -9,14 +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>
index 9d987a6f47c81fa1c24a4f6be0052b7520a83849..dde7b6bca56c7d4df35e7bdf5eb79114e18b834a 100644 (file)
@@ -12,6 +12,9 @@
  * included in the libsys code.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <errno.h>
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -26,9 +29,7 @@
 #include <sys/param.h>
 #include <unistd.h>
 
-#include <afsconfig.h>
 #include <afs/afssyscalls.h>
-#include <afs/param.h>
 #include <kopenafs.h>
 
 static volatile sig_atomic_t syscall_okay = 1;
index 5222702b58fcc6124bd26b92535c4cbc4f81acde..12d1f877f37e0148f75a4a4715af138808222fab 100644 (file)
@@ -34,6 +34,9 @@
  * 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..f1b6c858f5e18a6d55a1b60e9808c0cb2055c8a3 100644 (file)
@@ -34,6 +34,9 @@
  * 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 0304c8b4abe8c42f32bd6631e0b1aa09c409f160..1c893837b49956bca57ccf25907623a1e6882f46 100644 (file)
@@ -8,6 +8,9 @@
  */
 
 /* 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 51cf826d02e8ad343b031f9181d97a2f1e1ac380..1af9869d45b9086e21b242bc7baf5d62ca6881ff 100644 (file)
@@ -7,13 +7,14 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <syslog.h>
 #include <stdlib.h>
 #include <string.h>
 #include <pwd.h>
 #include <unistd.h>
-#include <afsconfig.h>
-#include <afs/param.h>
 
 
 #include <security/pam_appl.h>
index 1fca34805604b2f99f76ec2c9897f2672771ef14..9be3798587c81ddad0bf2a52674ac42706dd46d6 100644 (file)
@@ -7,13 +7,14 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <syslog.h>
 #include <stdlib.h>
 #include <string.h>
 #include <pwd.h>
 #include <unistd.h>
-#include <afsconfig.h>
-#include <afs/param.h>
 
 #include <security/pam_appl.h>
 #include <security/pam_modules.h>
index 1bc22290e42064de9b4c818fad37f1d8669fa8f9..2d051207b1f35051456cab3e72b41b65a57d87e2 100644 (file)
@@ -7,14 +7,15 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <syslog.h>
 #include <stdlib.h>
 #include <string.h>
 #include <pwd.h>
 #include <unistd.h>
 #include <errno.h>
-#include <afsconfig.h>
-#include <afs/param.h>
 
 #include <security/pam_appl.h>
 #include <security/pam_modules.h>
index c9d1a6f491f4ffc9d2a2e5ef515484d2e5903988..9e6de7a0f333cda136b31e7bff5cd290761d0862 100644 (file)
@@ -7,14 +7,15 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <stdio.h>
 #include <assert.h>
 #include <unistd.h>
 #include <errno.h>
 #include <syslog.h>
 #include <security/pam_appl.h>
-#include <afsconfig.h>
-#include <afs/param.h>
 #include <sys/wait.h>
 #include <limits.h>
 #include <string.h>
index c0a89aef986560b984795d7d63574e5debeb5ece..16dc72344416a22f176b752753aa82cb7a43936d 100644 (file)
@@ -11,6 +11,9 @@
  *                  output of this program to be valid.
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #ifndef _WIN32
 #include <sys/time.h>
@@ -25,8 +28,6 @@
 #include <string.h>
 #include <errno.h>
 
-#include <afsconfig.h>
-#include <afs/param.h>
 #include <afs/com_err.h>
 
 
index b363aac5c042938277df02c7b1fcc483c155cd99..d9697692df7781ecd77ed3b82450b34b71cb961a 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 455c1612e1ee8a45e16c1d5a27f74c963a473ddd..e4c75e4de640da521802cfe2dd9204854866a179 100644 (file)
@@ -7,14 +7,13 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/file.h>
 #include <stdio.h>
-#include <afsconfig.h>
-#include <afs/param.h>
-
-
 
 #include "AFS_component_version_number.c"
 
index b1bfee0fa1f4c1066a8826a79cc4aea73994a1c8..f5517150c4ab1ba99af6b5701a574f8665fd6b6a 100644 (file)
 /*
  * --------------------- Required definitions ---------------------
  */
-#include <stdlib.h>
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <stdlib.h>
+
 
 #ifdef AFS_AIX32_ENV
 #include <signal.h>
index 127cd943e21f386db382cf0340d0c93d987f08b2..9132b5f49eee56b2a759b262503e2728c72d0232 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>
index 5fbd058fc3c7ec219961454df6260333f63298f9..e49ddd6a904fdcc298ce2cbd70f2093ba79edd7a 100644 (file)
@@ -7,11 +7,11 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <afs/vldbint.h>
-
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <afs/vldbint.h>
+
 
 #include <stdio.h>
 #include <string.h>
index 0e483772db3a270431ee4f668a076cdd50424390..f520deafccfa0fb69783a0631e38848312a5436c 100644 (file)
 
  */
 
+#include <afsconfig.h>
+#include <afs/param.h>
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <afsconfig.h>
-#include <afs/param.h>
 
 
 #include <afs/afsutil.h>
index fae960c83a1e9ce3a47617b300078c86db056542..743d1b83661af7f56195c8b299d549266108d26b 100644 (file)
@@ -7,8 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <sys/param.h>
 #include <afsconfig.h>
+#include <sys/param.h>
 
 
 #include <afs/param.h>