|
Lucio Andrés Illanes Albornoz |
ba3f5b |
From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
From: NIIBE Yutaka <gniibe@fsij.org>
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
Date: Mon, 15 Apr 2019 15:10:44 +0900
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
Subject: [PATCH] awk: Prepare for Gawk 5.0.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
* src/Makefile.am: Use pkg_namespace (instead of namespace).
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
* src/mkerrnos.awk: Likewise.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
which only allows escaping specific characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
GnuPG-bug-id: 4459
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
Reported-by: Marius Schamschula
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
---
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
lang/cl/mkerrcodes.awk | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/Makefile.am | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/mkerrcodes.awk | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/mkerrcodes1.awk | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/mkerrcodes2.awk | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/mkerrnos.awk | 2 +-
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
src/mkstrtable.awk | 10 +++++-----
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
7 files changed, 11 insertions(+), 11 deletions(-)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index ae29043..9a1fc18 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/lang/cl/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/lang/cl/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -122,7 +122,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index ce1b882..f2590cb 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/Makefile.am
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/Makefile.am
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
errnos-sym.h: Makefile mkstrtable.awk errnos.in
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
$(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- -v prefix=GPG_ERR_ -v namespace=errnos_ \
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
$(srcdir)/errnos.in >$@
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index 46d436c..e9c857c 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/mkerrcodes.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -85,7 +85,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index a771a73..4578e29 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/mkerrcodes1.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/mkerrcodes1.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -81,7 +81,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index ea58503..188f7a4 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/mkerrcodes2.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/mkerrcodes2.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -91,7 +91,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index f79df66..15b1aad 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/mkerrnos.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/mkerrnos.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -83,7 +83,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
index c9de9c1..285e45f 100644
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--- a/src/mkstrtable.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+++ b/src/mkstrtable.awk
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -77,7 +77,7 @@
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
#
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
# The variable prefix can be used to prepend a string to each message.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
#
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
-# The variable namespace can be used to prepend a string to each
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+# The variable pkg_namespace can be used to prepend a string to each
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
# variable and macro name.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
BEGIN {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -102,7 +102,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "/* The purpose of this complex string table is to produce";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " optimal code with a minimum of relocations. */";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- print "static const char " namespace "msgstr[] = ";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ print "static const char " pkg_namespace "msgstr[] = ";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
header = 0;
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
else
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -110,7 +110,7 @@ header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
}
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
!header {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- sub (/\#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ sub (/#.+/, "");
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
if (/^$/)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -150,7 +150,7 @@ END {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
else
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " gettext_noop (\"" last_msgstr "\");";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- print "static const int " namespace "msgidx[] =";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ print "static const int " pkg_namespace "msgidx[] =";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " {";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
for (i = 0; i < coded_msgs; i++)
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " " pos[i] ",";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
@@ -158,7 +158,7 @@ END {
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " };";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "static GPG_ERR_INLINE int";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
- print namespace "msgidxof (int code)";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
+ print pkg_namespace "msgidxof (int code)";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print "{";
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
print " return (0 ? 0";
|
|
Jack Duvall |
35039d |
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
--
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
2.11.0
|
|
Jack Duvall |
35039d |
diff -ru a/configure.ac b/configure.ac
|
|
Jack Duvall |
35039d |
--- a/configure.ac 2019-03-19 04:56:05.000000000 -0400
|
|
Jack Duvall |
35039d |
+++ b/configure.ac 2020-03-11 12:27:31.000000000 -0400
|
|
Jack Duvall |
35039d |
@@ -549,19 +549,19 @@
|
|
Jack Duvall |
35039d |
fi
|
|
Jack Duvall |
35039d |
;;
|
|
Jack Duvall |
35039d |
esac
|
|
Jack Duvall |
35039d |
-case "$libdir" in
|
|
Jack Duvall |
35039d |
- /usr/lib|/usr/lib64|/lib|/lib64) ;;
|
|
Jack Duvall |
35039d |
- '${exec_prefix}/lib')
|
|
Jack Duvall |
35039d |
- if test "$exec_prefix" = "NONE"; then
|
|
Jack Duvall |
35039d |
- if test "$prefix" != / -a "$prefix" != /usr; then
|
|
Jack Duvall |
35039d |
- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
|
|
Jack Duvall |
35039d |
- fi
|
|
Jack Duvall |
35039d |
- elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then
|
|
Jack Duvall |
35039d |
- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
|
|
Jack Duvall |
35039d |
- fi
|
|
Jack Duvall |
35039d |
- ;;
|
|
Jack Duvall |
35039d |
- *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;;
|
|
Jack Duvall |
35039d |
-esac
|
|
Jack Duvall |
35039d |
+#case "$libdir" in
|
|
Jack Duvall |
35039d |
+# /usr/lib|/usr/lib64|/lib|/lib64) ;;
|
|
Jack Duvall |
35039d |
+# '${exec_prefix}/lib')
|
|
Jack Duvall |
35039d |
+# if test "$exec_prefix" = "NONE"; then
|
|
Jack Duvall |
35039d |
+# if test "$prefix" != / -a "$prefix" != /usr; then
|
|
Jack Duvall |
35039d |
+# GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
|
|
Jack Duvall |
35039d |
+# fi
|
|
Jack Duvall |
35039d |
+# elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then
|
|
Jack Duvall |
35039d |
+# GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
|
|
Jack Duvall |
35039d |
+# fi
|
|
Jack Duvall |
35039d |
+# ;;
|
|
Jack Duvall |
35039d |
+# *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;;
|
|
Jack Duvall |
35039d |
+#esac
|
|
Lucio Andrés Illanes Albornoz |
ba3f5b |
|
|
Jack Duvall |
35039d |
AC_SUBST(GPG_ERROR_CONFIG_LIBS)
|
|
Jack Duvall |
35039d |
AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
|