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>
#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
*
*-------------------------------------------------------------------------*/
-#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>
*
*-------------------------------------------------------------------------*/
-#include <stdio.h>
#include <afsconfig.h>
#include <afs/param.h>
+#include <stdio.h>
#include <afs/xstat_fs.h>
#include <afs/xstat_cm.h>
#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
/* 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>
* 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>
* 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>
* 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>
* directory or online at http://www.openafs.org/dl/license10.html
*/
+#include "afsconfig.h"
+
#define MAXLINELEN 1024
#define MAXTOKLEN 100
#include <sys/param.h>
#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. */
* 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>
*
* 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>
* 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>
* 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"
* 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>
* -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 */
* -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();
* 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>
#include <string.h>
#include <sys/file.h>
-#include <afsconfig.h>
-#include <afs/param.h>
-
#include <lock.h>
#include <netinet/in.h>
* specifies the terms and conditions for redistribution.
*/
-#include <sys/param.h>
#include <afsconfig.h>
+#include <sys/param.h>
#include <stdio.h>
/* 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>
* included in the libsys code.
*/
+#include <afsconfig.h>
+#include <afs/param.h>
+
#include <errno.h>
#include <sys/types.h>
#include <netinet/in.h>
#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;
* 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"
* 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"
*/
/* 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"
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>
#include "portable_defns.h"
#include "gc.h"
-#include <afsconfig.h>
-#include <afs/param.h>
#include <afs/afsutil.h>
/*#define MINIMAL_GC*/
* 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>
* 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>
* 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>
* 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>
* output of this program to be valid.
*/
+#include <afsconfig.h>
+#include <afs/param.h>
+
#include <sys/types.h>
#ifndef _WIN32
#include <sys/time.h>
#include <string.h>
#include <errno.h>
-#include <afsconfig.h>
-#include <afs/param.h>
#include <afs/com_err.h>
* 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>
* 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>
* 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"
/*
* --------------------- Required definitions ---------------------
*/
-#include <stdlib.h>
#include <afsconfig.h>
#include <afs/param.h>
+#include <stdlib.h>
+
#ifdef AFS_AIX32_ENV
#include <signal.h>
/* Security related utilities for the Windows platform */
-#include <afs/param.h>
#include <afsconfig.h>
+#include <afs/param.h>
#include <afs/stds.h>
* 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>
*/
+#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>
* 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>