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

Generated by cgit