Skip to content

Commit 7865041

Browse files
author
NIIBE Yutaka
committed
awk: Prepare for Gawk 5.0.
* src/Makefile.am: Use pkg_namespace (instead of namespace). * src/mkerrnos.awk: Likewise. * lang/cl/mkerrcodes.awk: Don't escape # in regexp. * src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. -- In Gawk 5.0, regexp routines are replaced by Gnulib implementation, which only allows escaping specific characters. GnuPG-bug-id: 4459 Reported-by: Marius Schamschula Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
1 parent 86cb22a commit 7865041

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

lang/cl/mkerrcodes.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ header {
122122
}
123123

124124
!header {
125-
sub (/\#.+/, "");
125+
sub (/#.+/, "");
126126
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
127127

128128
if (/^$/)

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
293293

294294
errnos-sym.h: Makefile mkstrtable.awk errnos.in
295295
$(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
296-
-v prefix=GPG_ERR_ -v namespace=errnos_ \
296+
-v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
297297
$(srcdir)/errnos.in >$@
298298

299299

src/mkerrcodes.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ header {
8585
}
8686

8787
!header {
88-
sub (/\#.+/, "");
88+
sub (/#.+/, "");
8989
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
9090

9191
if (/^$/)

src/mkerrcodes1.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ header {
8181
}
8282

8383
!header {
84-
sub (/\#.+/, "");
84+
sub (/#.+/, "");
8585
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
8686

8787
if (/^$/)

src/mkerrcodes2.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ header {
9191
}
9292

9393
!header {
94-
sub (/\#.+/, "");
94+
sub (/#.+/, "");
9595
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
9696

9797
if (/^$/)

src/mkerrnos.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ header {
8383
}
8484

8585
!header {
86-
sub (/\#.+/, "");
86+
sub (/#.+/, "");
8787
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
8888

8989
if (/^$/)

src/mkstrtable.awk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#
7878
# The variable prefix can be used to prepend a string to each message.
7979
#
80-
# The variable namespace can be used to prepend a string to each
80+
# The variable pkg_namespace can be used to prepend a string to each
8181
# variable and macro name.
8282

8383
BEGIN {
@@ -102,15 +102,15 @@ header {
102102
print "/* The purpose of this complex string table is to produce";
103103
print " optimal code with a minimum of relocations. */";
104104
print "";
105-
print "static const char " namespace "msgstr[] = ";
105+
print "static const char " pkg_namespace "msgstr[] = ";
106106
header = 0;
107107
}
108108
else
109109
print;
110110
}
111111

112112
!header {
113-
sub (/\#.+/, "");
113+
sub (/#.+/, "");
114114
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
115115

116116
if (/^$/)
@@ -150,15 +150,15 @@ END {
150150
else
151151
print " gettext_noop (\"" last_msgstr "\");";
152152
print "";
153-
print "static const int " namespace "msgidx[] =";
153+
print "static const int " pkg_namespace "msgidx[] =";
154154
print " {";
155155
for (i = 0; i < coded_msgs; i++)
156156
print " " pos[i] ",";
157157
print " " pos[coded_msgs];
158158
print " };";
159159
print "";
160160
print "static GPG_ERR_INLINE int";
161-
print namespace "msgidxof (int code)";
161+
print pkg_namespace "msgidxof (int code)";
162162
print "{";
163163
print " return (0 ? 0";
164164

0 commit comments

Comments
 (0)