You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
4.2 KiB

  1. From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
  2. From: NIIBE Yutaka <gniibe@fsij.org>
  3. Date: Mon, 15 Apr 2019 15:10:44 +0900
  4. Subject: [PATCH] awk: Prepare for Gawk 5.0.
  5. * src/Makefile.am: Use pkg_namespace (instead of namespace).
  6. * src/mkerrnos.awk: Likewise.
  7. * lang/cl/mkerrcodes.awk: Don't escape # in regexp.
  8. * src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
  9. --
  10. In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
  11. which only allows escaping specific characters.
  12. GnuPG-bug-id: 4459
  13. Reported-by: Marius Schamschula
  14. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
  15. ---
  16. lang/cl/mkerrcodes.awk | 2 +-
  17. src/Makefile.am | 2 +-
  18. src/mkerrcodes.awk | 2 +-
  19. src/mkerrcodes1.awk | 2 +-
  20. src/mkerrcodes2.awk | 2 +-
  21. src/mkerrnos.awk | 2 +-
  22. src/mkstrtable.awk | 10 +++++-----
  23. 7 files changed, 11 insertions(+), 11 deletions(-)
  24. diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
  25. index ae29043..9a1fc18 100644
  26. --- a/lang/cl/mkerrcodes.awk
  27. +++ b/lang/cl/mkerrcodes.awk
  28. @@ -122,7 +122,7 @@ header {
  29. }
  30. !header {
  31. - sub (/\#.+/, "");
  32. + sub (/#.+/, "");
  33. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  34. if (/^$/)
  35. diff --git a/src/Makefile.am b/src/Makefile.am
  36. index ce1b882..f2590cb 100644
  37. --- a/src/Makefile.am
  38. +++ b/src/Makefile.am
  39. @@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
  40. errnos-sym.h: Makefile mkstrtable.awk errnos.in
  41. $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
  42. - -v prefix=GPG_ERR_ -v namespace=errnos_ \
  43. + -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
  44. $(srcdir)/errnos.in >$@
  45. diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
  46. index 46d436c..e9c857c 100644
  47. --- a/src/mkerrcodes.awk
  48. +++ b/src/mkerrcodes.awk
  49. @@ -85,7 +85,7 @@ header {
  50. }
  51. !header {
  52. - sub (/\#.+/, "");
  53. + sub (/#.+/, "");
  54. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  55. if (/^$/)
  56. diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
  57. index a771a73..4578e29 100644
  58. --- a/src/mkerrcodes1.awk
  59. +++ b/src/mkerrcodes1.awk
  60. @@ -81,7 +81,7 @@ header {
  61. }
  62. !header {
  63. - sub (/\#.+/, "");
  64. + sub (/#.+/, "");
  65. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  66. if (/^$/)
  67. diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
  68. index ea58503..188f7a4 100644
  69. --- a/src/mkerrcodes2.awk
  70. +++ b/src/mkerrcodes2.awk
  71. @@ -91,7 +91,7 @@ header {
  72. }
  73. !header {
  74. - sub (/\#.+/, "");
  75. + sub (/#.+/, "");
  76. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  77. if (/^$/)
  78. diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
  79. index f79df66..15b1aad 100644
  80. --- a/src/mkerrnos.awk
  81. +++ b/src/mkerrnos.awk
  82. @@ -83,7 +83,7 @@ header {
  83. }
  84. !header {
  85. - sub (/\#.+/, "");
  86. + sub (/#.+/, "");
  87. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  88. if (/^$/)
  89. diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
  90. index c9de9c1..285e45f 100644
  91. --- a/src/mkstrtable.awk
  92. +++ b/src/mkstrtable.awk
  93. @@ -77,7 +77,7 @@
  94. #
  95. # The variable prefix can be used to prepend a string to each message.
  96. #
  97. -# The variable namespace can be used to prepend a string to each
  98. +# The variable pkg_namespace can be used to prepend a string to each
  99. # variable and macro name.
  100. BEGIN {
  101. @@ -102,7 +102,7 @@ header {
  102. print "/* The purpose of this complex string table is to produce";
  103. print " optimal code with a minimum of relocations. */";
  104. print "";
  105. - print "static const char " namespace "msgstr[] = ";
  106. + print "static const char " pkg_namespace "msgstr[] = ";
  107. header = 0;
  108. }
  109. else
  110. @@ -110,7 +110,7 @@ header {
  111. }
  112. !header {
  113. - sub (/\#.+/, "");
  114. + sub (/#.+/, "");
  115. sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
  116. if (/^$/)
  117. @@ -150,7 +150,7 @@ END {
  118. else
  119. print " gettext_noop (\"" last_msgstr "\");";
  120. print "";
  121. - print "static const int " namespace "msgidx[] =";
  122. + print "static const int " pkg_namespace "msgidx[] =";
  123. print " {";
  124. for (i = 0; i < coded_msgs; i++)
  125. print " " pos[i] ",";
  126. @@ -158,7 +158,7 @@ END {
  127. print " };";
  128. print "";
  129. print "static GPG_ERR_INLINE int";
  130. - print namespace "msgidxof (int code)";
  131. + print pkg_namespace "msgidxof (int code)";
  132. print "{";
  133. print " return (0 ? 0";
  134. --
  135. 2.21.0