From 972a4072827fb2ec680354d5adebc2c5cca06939 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 6 May 2010 14:58:52 +0100 Subject: [PATCH] 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 --- src/comerr/compile_et.c | 1 + src/rxgen/rpc_main.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/comerr/compile_et.c b/src/comerr/compile_et.c index 1cd46d2f1f..37df6b61cc 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 cccc754846..5c02c16d22 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");