From: Simon Wilkinson Date: Thu, 6 May 2010 13:58:52 +0000 (+0100) Subject: Always include afsconfig.h in autogenerated files X-Git-Tag: openafs-devel-1_5_75~310 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=972a4072827fb2ec680354d5adebc2c5cca06939;p=packages%2Fo%2Fopenafs.git Always include afsconfig.h in autogenerated files Modify rxgen and compile_et so that the files they output always contain afsconfig.h before afs/param.h. This avoids problems where afs/param.h, or headers included from it, rely on having the results of configure tests available. Change-Id: I0198500a17abd31ee1057d6780cbe5a5e1bc8c59 Reviewed-on: http://gerrit.openafs.org/1913 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/comerr/compile_et.c b/src/comerr/compile_et.c index 1cd46d2f1..37df6b61c 100644 --- a/src/comerr/compile_et.c +++ b/src/comerr/compile_et.c @@ -92,6 +92,7 @@ static const char *const language_names[] = { }; static const char *const c_src_prolog[] = { + "#include \n", "#include \n", "#include \n", "static const char * const text[] = {\n", diff --git a/src/rxgen/rpc_main.c b/src/rxgen/rpc_main.c index cccc75484..5c02c16d2 100644 --- a/src/rxgen/rpc_main.c +++ b/src/rxgen/rpc_main.c @@ -355,8 +355,10 @@ c_output(char *infile, char *define, int extend, char *outfile, int append) f_print(fout, "/* Machine generated file -- Do NOT edit */\n\n"); if (xflag) { if (kflag) { + f_print(fout, "#include \"afsconfig.h\"\n"); f_print(fout, "#include \"afs/param.h\"\n"); } else { + f_print(fout, "#include \n"); f_print(fout, "#include \n"); } f_print(fout, "#ifdef AFS_NT40_ENV\n"); @@ -506,6 +508,7 @@ h_output(char *infile, char *define, int extend, char *outfile, int append) f_print(fout, "#include \"rx/rx_globals.h\"\n"); } f_print(fout, "#else /* KERNEL */\n"); + f_print(fout, "#include \n"); f_print(fout, "#include \n"); f_print(fout, "#include \n"); f_print(fout, "#include \n");