libgpg_error: fix for gawk v5

fixes #2323
This commit is contained in:
Tony Theodore 2019-04-24 23:25:59 +10:00
parent b1fc38f29c
commit cc31b9bfd9
2 changed files with 141 additions and 2 deletions

View File

@ -1,16 +1,18 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 15 Dec 2018 16:51:30 +0100
Subject: [PATCH 1/1] [MXE] more tolerant parsing for mingw in host triplet
Subject: [PATCH 1/2] more tolerant parsing for mingw in host triplet
diff --git a/src/mkheader.c b/src/mkheader.c
index 1111111..2222222 100644
--- a/src/mkheader.c
+++ b/src/mkheader.c
@@ -601,7 +601,7 @@ write_special (const char *fname, int lnr, const char *tag)
@@ -602,7 +602,7 @@ write_special (const char *fname, int lnr, const char *tag)
}
else if (!strcmp (tag, "include:os-add"))
{
@ -19,3 +21,139 @@ index 1111111..2222222 100644
{
include_file (fname, lnr, "w32-add.h", write_line);
}
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Wed, 24 Apr 2019 23:18:54 +1000
Subject: [PATCH 2/2] awk: Prepare for Gawk 5.0.
taken from:
https://dev.gnupg.org/rE7865041c77f4f7005282f10f9b6666b19072fbdf
diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
index 1111111..2222222 100644
--- a/lang/cl/mkerrcodes.awk
+++ b/lang/cl/mkerrcodes.awk
@@ -122,7 +122,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
diff --git a/src/Makefile.am b/src/Makefile.am
index 1111111..2222222 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 pkg_namespace=errnos_ \
$(srcdir)/errnos.in >$@
diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
index 1111111..2222222 100644
--- a/src/mkerrcodes.awk
+++ b/src/mkerrcodes.awk
@@ -85,7 +85,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
index 1111111..2222222 100644
--- a/src/mkerrcodes1.awk
+++ b/src/mkerrcodes1.awk
@@ -81,7 +81,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
index 1111111..2222222 100644
--- a/src/mkerrcodes2.awk
+++ b/src/mkerrcodes2.awk
@@ -91,7 +91,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
index 1111111..2222222 100644
--- a/src/mkerrnos.awk
+++ b/src/mkerrnos.awk
@@ -83,7 +83,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
index 1111111..2222222 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 pkg_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 " pkg_namespace "msgstr[] = ";
header = 0;
}
else
@@ -110,7 +110,7 @@ header {
}
!header {
- sub (/\#.+/, "");
+ sub (/#.+/, "");
sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
if (/^$/)
@@ -150,7 +150,7 @@ END {
else
print " gettext_noop (\"" last_msgstr "\");";
print "";
- print "static const int " namespace "msgidx[] =";
+ print "static const int " pkg_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 pkg_namespace "msgidxof (int code)";
print "{";
print " return (0 ? 0";

View File

@ -20,6 +20,7 @@ endef
define $(PKG)_BUILD
cd '$(SOURCE_DIR)/src/syscfg' && ln -s lock-obj-pub.mingw32.h lock-obj-pub.mingw32.$(call merge,.,$(call rest,$(call split,.,$(TARGET)))).h
cd '$(SOURCE_DIR)' && autoreconf -fi
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--disable-nls \