diff options
author | NIIBE Yutaka <[email protected]> | 2019-04-16 04:24:10 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-04-16 04:27:44 +0000 |
commit | ee766b2b5d646643d66d23eae478f71c0a01a343 (patch) | |
tree | 2dbd6de1a05b30f71ac80d6fe9a3658a9e879e2a | |
parent | gpg: Accept also armored data from the WKD. (diff) | |
download | gnupg-ee766b2b5d646643d66d23eae478f71c0a01a343.tar.gz gnupg-ee766b2b5d646643d66d23eae478f71c0a01a343.zip |
common: Fix AWK portability.
* common/Makefile.am: Use pkg_namespace.
* common/mkstrtable.awk: Use pkg_namespace. Regexp fix.
--
Cherry-picked from master commit:
b6f0b0efa19e0434024bc16e246032b613fd448a
GnuPG-bug-Bug: 4459
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | common/Makefile.am | 4 | ||||
-rw-r--r-- | common/mkstrtable.awk | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index fcbe7ea66..3dbad0ccc 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -148,13 +148,13 @@ if MAINTAINER_MODE audit-events.h: Makefile.am mkstrtable.awk exaudit.awk audit.h $(AWK) -f $(srcdir)/exaudit.awk $(srcdir)/audit.h \ | $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \ - -v namespace=eventstr_ > $(srcdir)/audit-events.h + -v pkg_namespace=eventstr_ > $(srcdir)/audit-events.h # Create the status-codes.h include file from status.h status-codes.h: Makefile.am mkstrtable.awk exstatus.awk status.h $(AWK) -f $(srcdir)/exstatus.awk $(srcdir)/status.h \ | $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 -v nogettext=1 \ - -v namespace=statusstr_ > $(srcdir)/status-codes.h + -v pkg_namespace=statusstr_ > $(srcdir)/status-codes.h endif # diff --git a/common/mkstrtable.awk b/common/mkstrtable.awk index b5d4ef07a..60efce8a3 100644 --- a/common/mkstrtable.awk +++ b/common/mkstrtable.awk @@ -76,7 +76,7 @@ # # The variable prefix can be used to prepend a string to each message. # -# The variable namespace can be used to prepend a string to each +# The variable pkg_namespace can be used to prepend a string to each # variable and macro name. BEGIN { @@ -101,7 +101,7 @@ header { print "/* The purpose of this complex string table is to produce"; print " optimal code with a minimum of relocations. */"; print ""; - print "static const char " namespace "msgstr[] = "; + print "static const char " pkg_namespace "msgstr[] = "; header = 0; } else @@ -109,7 +109,7 @@ header { } !header { - sub (/\#.+/, ""); + sub (/#.+/, ""); sub (/[ ]+$/, ""); # Strip trailing space and tab characters. if (/^$/) @@ -149,14 +149,14 @@ END { else print " gettext_noop (\"" prefix last_msgstr "\");"; print ""; - print "static const int " namespace "msgidx[] ="; + print "static const int " pkg_namespace "msgidx[] ="; print " {"; for (i = 0; i < coded_msgs; i++) print " " pos[i] ","; print " " pos[coded_msgs]; print " };"; print ""; - print "#define " namespace "msgidxof(code) (0 ? -1 \\"; + print "#define " pkg_namespace "msgidxof(code) (0 ? -1 \\"; # Gather the ranges. skip = code[0]; |