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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Simon Wilkinson 2010-05-06 14:58:52 +01:00 committed by Derrick Brashear
parent dc9bef83b0
commit 972a407282
2 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,7 @@ static const char *const language_names[] = {
};
static const char *const c_src_prolog[] = {
"#include <afsconfig.h>\n",
"#include <afs/param.h>\n",
"#include <afs/error_table.h>\n",
"static const char * const text[] = {\n",

View File

@ -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 <afsconfig.h>\n");
f_print(fout, "#include <afs/param.h>\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 <afsconfig.h>\n");
f_print(fout, "#include <afs/param.h>\n");
f_print(fout, "#include <afs/stds.h>\n");
f_print(fout, "#include <sys/types.h>\n");