summaryrefslogtreecommitdiffstats
path: root/src/util/et/et_h.awk
diff options
context:
space:
mode:
authorRichard Basch <probe@mit.edu>1997-02-20 06:36:20 +0000
committerRichard Basch <probe@mit.edu>1997-02-20 06:36:20 +0000
commitdc379c9d5736eb20835409df1c138040ace11e50 (patch)
treebe6abc3b867f869e1e0ceeaf6778e3dd12b79ec8 /src/util/et/et_h.awk
parent9d8c34f6ddf2a5c684289d0a5e7d764344d7824d (diff)
downloadkrb5-dc379c9d5736eb20835409df1c138040ace11e50.tar.gz
krb5-dc379c9d5736eb20835409df1c138040ace11e50.tar.xz
krb5-dc379c9d5736eb20835409df1c138040ace11e50.zip
et_c.awk:
By default, the Unix version will still modify the _et_list variable (MIT com_err compatibility) Also, because et_XXX_error_table (struct error_table) is a global variable, no initialization/cleanup routine needs to be declared. The initialization routine is defined to be a no-op on all platforms but Unix to avoid compilation errors of a lot of the tree. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9932 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/et/et_h.awk')
-rw-r--r--src/util/et/et_h.awk12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/util/et/et_h.awk b/src/util/et/et_h.awk
index 075ebc39a..4a635f5c6 100644
--- a/src/util/et/et_h.awk
+++ b/src/util/et/et_h.awk
@@ -110,6 +110,9 @@ c2n["_"]=63
print " * " outfile ":" > outfile
print " * This file is automatically generated; please do not edit it." > outfile
print " */" > outfile
+ print "" > outfile
+ print "#include <com_err.h>" > outfile
+ print "" > outfile
}
/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ {
@@ -133,8 +136,6 @@ c2n["_"]=63
}
END {
- print "extern void initialize_" table_name "_error_table ();" > outfile
- print "extern void cleanup_" table_name "_error_table ();" > outfile
if (tab_base_high == 0) {
print "#define ERROR_TABLE_BASE_" table_name " (" \
sprintf("%d", tab_base_sign*tab_base_low) \
@@ -145,7 +146,14 @@ END {
tab_base_low) "L)" > outfile
}
print "" > outfile
+ print "extern struct error_table et_" table_name "_error_table;" > outfile
+ print "" > outfile
+ print "#ifdef unix" > outfile
print "/* for compatibility with older versions... */" > outfile
+ print "extern void initialize_" table_name "_error_table ();" > outfile
print "#define init_" table_name "_err_tbl initialize_" table_name "_error_table" > outfile
print "#define " table_name "_err_base ERROR_TABLE_BASE_" table_name > outfile
+ print "#else" > outfile
+ print "#define initialize_" table_name "_error_table()" > outfile
+ print "#endif" > outfile
}