From 55b9550de790126856666ad8cb78a75c5ae48220 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Sat, 13 Apr 2019 19:59:45 +0200 Subject: [PATCH] Fixed build with gawk-5 gawk-5 has the word "namespace" reserved which results in an error when building libgpg-error: gawk: fatal: cannot use gawk builtin `namespace' as variable name Fixed this by renaming "namespace" to "libgpg_error_namespace". Signed-off-by: Lars Wendler --- src/Makefile.am | 2 +- src/mkstrtable.awk | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index ce1b882..b329242 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile errnos-sym.h: Makefile mkstrtable.awk errnos.in $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ - -v prefix=GPG_ERR_ -v namespace=errnos_ \ + -v prefix=GPG_ERR_ -v libgpg_error_namespace=errnos_ \ $(srcdir)/errnos.in >$@ diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk index c9de9c1..5b5307b 100644 --- a/src/mkstrtable.awk +++ b/src/mkstrtable.awk @@ -77,7 +77,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 libgpg_error_namespace can be used to prepend a string to each # variable and macro name. BEGIN { @@ -102,7 +102,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 " libgpg_error_namespace "msgstr[] = "; header = 0; } else @@ -150,7 +150,7 @@ END { else print " gettext_noop (\"" last_msgstr "\");"; print ""; - print "static const int " namespace "msgidx[] ="; + print "static const int " libgpg_error_namespace "msgidx[] ="; print " {"; for (i = 0; i < coded_msgs; i++) print " " pos[i] ","; @@ -158,7 +158,7 @@ END { print " };"; print ""; print "static GPG_ERR_INLINE int"; - print namespace "msgidxof (int code)"; + print libgpg_error_namespace "msgidxof (int code)"; print "{"; print " return (0 ? 0"; -- 2.21.0