From caf0c40caa4ce1d90ba719824f7f39c54dee7799 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sun, 9 Mar 1997 20:17:49 +0000 Subject: [PATCH] Add a declaration of struct error_list to header files, and multiple inclusion block. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1331 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/com_err/compile_et.awk | 10 ++++++++++ lib/error/compile_et.awk | 10 ++++++++++ lib/krb5/error/compile_et.awk | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/lib/com_err/compile_et.awk b/lib/com_err/compile_et.awk index ff616b679..0cfe65f52 100644 --- a/lib/com_err/compile_et.awk +++ b/lib/com_err/compile_et.awk @@ -18,6 +18,8 @@ $1 == "error_table" { # name = foo[1] c_file = name "_err.c" h_file = name "_err.h" + H_FILE = "__" toupper(h_file) "__" + gsub("[^A-Z0-9_]", "_", H_FILE) number = 0 print "/* Generated from " FILENAME " */" > c_file print "#include " > c_file @@ -26,7 +28,13 @@ $1 == "error_table" { print "static const char *text[] = {" > c_file print "/* Generated from " FILENAME " */" > h_file + print "" > h_file + print "#ifndef " H_FILE > h_file + print "#define " H_FILE > h_file + print "" > h_file # print "#include " > h_file + print "" > h_file + print "struct error_list;" > h_file print "" > h_file print "void initialize_" name "_error_table(struct error_list**);" > h_file print "" > h_file @@ -52,6 +60,8 @@ function end_file(c_file, h_file){ close(c_file) print "\t" name "_num_errors = " number > h_file print "};" > h_file + print "" > h_file + print "#endif /* " H_FILE " */" > h_file close(h_file) } diff --git a/lib/error/compile_et.awk b/lib/error/compile_et.awk index ff616b679..0cfe65f52 100644 --- a/lib/error/compile_et.awk +++ b/lib/error/compile_et.awk @@ -18,6 +18,8 @@ $1 == "error_table" { # name = foo[1] c_file = name "_err.c" h_file = name "_err.h" + H_FILE = "__" toupper(h_file) "__" + gsub("[^A-Z0-9_]", "_", H_FILE) number = 0 print "/* Generated from " FILENAME " */" > c_file print "#include " > c_file @@ -26,7 +28,13 @@ $1 == "error_table" { print "static const char *text[] = {" > c_file print "/* Generated from " FILENAME " */" > h_file + print "" > h_file + print "#ifndef " H_FILE > h_file + print "#define " H_FILE > h_file + print "" > h_file # print "#include " > h_file + print "" > h_file + print "struct error_list;" > h_file print "" > h_file print "void initialize_" name "_error_table(struct error_list**);" > h_file print "" > h_file @@ -52,6 +60,8 @@ function end_file(c_file, h_file){ close(c_file) print "\t" name "_num_errors = " number > h_file print "};" > h_file + print "" > h_file + print "#endif /* " H_FILE " */" > h_file close(h_file) } diff --git a/lib/krb5/error/compile_et.awk b/lib/krb5/error/compile_et.awk index ff616b679..0cfe65f52 100644 --- a/lib/krb5/error/compile_et.awk +++ b/lib/krb5/error/compile_et.awk @@ -18,6 +18,8 @@ $1 == "error_table" { # name = foo[1] c_file = name "_err.c" h_file = name "_err.h" + H_FILE = "__" toupper(h_file) "__" + gsub("[^A-Z0-9_]", "_", H_FILE) number = 0 print "/* Generated from " FILENAME " */" > c_file print "#include " > c_file @@ -26,7 +28,13 @@ $1 == "error_table" { print "static const char *text[] = {" > c_file print "/* Generated from " FILENAME " */" > h_file + print "" > h_file + print "#ifndef " H_FILE > h_file + print "#define " H_FILE > h_file + print "" > h_file # print "#include " > h_file + print "" > h_file + print "struct error_list;" > h_file print "" > h_file print "void initialize_" name "_error_table(struct error_list**);" > h_file print "" > h_file @@ -52,6 +60,8 @@ function end_file(c_file, h_file){ close(c_file) print "\t" name "_num_errors = " number > h_file print "};" > h_file + print "" > h_file + print "#endif /* " H_FILE " */" > h_file close(h_file) }