diff options
author | kim <kim@pkgsrc.org> | 2005-12-29 16:09:42 +0000 |
---|---|---|
committer | kim <kim@pkgsrc.org> | 2005-12-29 16:09:42 +0000 |
commit | 245cd1880bbb9b1bb156a6f2af93fe0603a0d2e7 (patch) | |
tree | 215fbb193ebe1ccd10a8169b048ddbd1e04463ba /security/libgpg-error/patches | |
parent | cc02a7387f564ff176b63abb3924f702d7973021 (diff) | |
download | pkgsrc-245cd1880bbb9b1bb156a6f2af93fe0603a0d2e7.tar.gz |
Avoid changing FS as it triggers an odd bug on some awk versions, with
incorrect field calculation for the second field if the first field is
numeric and there are only 2 fields total in the input record (line).
The buggy awk was in 2.99.* and early 3.99.*, and identifies itself as
awk version 20030729. However, not all awk's with this version number
exhibit the problem (so it could be related to a library used by awk).
Recent 3.99.* builds don't have this problem, and the awk versio on
them is also much more recent.
Diffstat (limited to 'security/libgpg-error/patches')
-rw-r--r-- | security/libgpg-error/patches/patch-ae | 25 | ||||
-rw-r--r-- | security/libgpg-error/patches/patch-af | 25 | ||||
-rw-r--r-- | security/libgpg-error/patches/patch-ag | 25 | ||||
-rw-r--r-- | security/libgpg-error/patches/patch-ah | 25 | ||||
-rw-r--r-- | security/libgpg-error/patches/patch-ai | 70 |
5 files changed, 170 insertions, 0 deletions
diff --git a/security/libgpg-error/patches/patch-ae b/security/libgpg-error/patches/patch-ae new file mode 100644 index 00000000000..339061691ae --- /dev/null +++ b/security/libgpg-error/patches/patch-ae @@ -0,0 +1,25 @@ +$NetBSD: patch-ae,v 1.1 2005/12/29 16:09:42 kim Exp $ + +Setting FS in some versions of awk makes it null. The default FS of +"whitespace" works fine, so no need to redefine it. + +--- src/mkerrcodes1.awk.orig 2004-03-08 18:44:05.000000000 +0200 ++++ src/mkerrcodes1.awk 2005-12-24 15:34:33.000000000 +0200 +@@ -55,7 +55,7 @@ + # as is trailing whitespace. + + BEGIN { +- FS="[\t]+"; ++ #FS="[\t]+"; + header = 1; + if (errnoidx == 0) + errnoidx = 2; +@@ -67,7 +67,7 @@ + /^#/ { next; } + + header { +- if ($1 ~ /^[0-9]/) ++ if ($0 ~ /^[0-9]/) + { + print "#include <errno.h>"; + print ""; diff --git a/security/libgpg-error/patches/patch-af b/security/libgpg-error/patches/patch-af new file mode 100644 index 00000000000..b9c97d2d062 --- /dev/null +++ b/security/libgpg-error/patches/patch-af @@ -0,0 +1,25 @@ +$NetBSD: patch-af,v 1.1 2005/12/29 16:09:42 kim Exp $ + +Setting FS in some versions of awk makes it null. The default FS of +"whitespace" works fine, so no need to redefine it. + +--- src/mkerrcodes.awk.orig 2004-04-22 16:30:12.000000000 +0300 ++++ src/mkerrcodes.awk 2005-12-24 15:36:22.000000000 +0200 +@@ -54,7 +54,7 @@ + # as is trailing whitespace. + + BEGIN { +- FS="[ \t]+GPG_ERR_"; ++ #FS="[ \t]+GPG_ERR_"; + print "/* Output of mkerrcodes.awk. DO NOT EDIT. */"; + print ""; + header = 1; +@@ -85,7 +85,7 @@ + if (/^$/) + next; + +- print " { " $1 ", \"GPG_ERR_" $2 "\" },"; ++ print " { " $1 ", \"" $2 "\" },"; + } + + END { diff --git a/security/libgpg-error/patches/patch-ag b/security/libgpg-error/patches/patch-ag new file mode 100644 index 00000000000..d3fdf0971a2 --- /dev/null +++ b/security/libgpg-error/patches/patch-ag @@ -0,0 +1,25 @@ +$NetBSD: patch-ag,v 1.1 2005/12/29 16:09:42 kim Exp $ + +Setting FS in some versions of awk makes it null. The default FS of +"whitespace" works fine, so no need to redefine it. + +--- src/mkerrnos.awk.orig 2004-03-08 18:44:05.000000000 +0200 ++++ src/mkerrnos.awk 2005-12-24 15:40:07.000000000 +0200 +@@ -56,7 +56,7 @@ + # as is trailing whitespace. + + BEGIN { +- FS="[\t]+"; ++ #FS="[\t]+"; + header = 1; + if (errnoidx == 0) + errnoidx = 2; +@@ -68,7 +68,7 @@ + /^#/ { next; } + + header { +- if ($1 ~ /^[0-9]/) ++ if ($0 ~ /^[0-9]/) + { + print "#include <errno.h>"; + print ""; diff --git a/security/libgpg-error/patches/patch-ah b/security/libgpg-error/patches/patch-ah new file mode 100644 index 00000000000..5595b8f1798 --- /dev/null +++ b/security/libgpg-error/patches/patch-ah @@ -0,0 +1,25 @@ +$NetBSD: patch-ah,v 1.1 2005/12/29 16:09:42 kim Exp $ + +Setting FS in some versions of awk makes it null. The default FS of +"whitespace" works fine, so no need to redefine it. + +--- src/mkstrtable.awk.orig 2004-03-08 18:44:05.000000000 +0200 ++++ src/mkstrtable.awk 2005-12-24 16:56:12.000000000 +0200 +@@ -81,7 +81,7 @@ + # variable and macro name. + + BEGIN { +- FS = "[\t]+"; ++ #FS = "[\t]+"; + # cpos holds the current position in the message string. + cpos = 0; + # msg holds the number of messages. +@@ -97,7 +97,7 @@ + /^#/ { next; } + + header { +- if ($1 ~ /^[0123456789]+$/) ++ if ($0 ~ /^[0-9]+/) + { + print "/* The purpose of this complex string table is to produce"; + print " optimal code with a minimum of relocations. */"; diff --git a/security/libgpg-error/patches/patch-ai b/security/libgpg-error/patches/patch-ai new file mode 100644 index 00000000000..91222e3cc81 --- /dev/null +++ b/security/libgpg-error/patches/patch-ai @@ -0,0 +1,70 @@ +$NetBSD: patch-ai,v 1.1 2005/12/29 16:09:42 kim Exp $ + +Setting FS in some versions of awk makes it null. Make this script +work with the default FS of "whitespace" instead. + +--- src/mkheader.awk.orig 2004-03-08 18:44:05.000000000 +0200 ++++ src/mkheader.awk 2005-12-24 16:51:38.000000000 +0200 +@@ -51,7 +51,7 @@ + # at the full path of the files in @srcdir@. + + BEGIN { +- FS = "[\t]+"; ++ #FS = "[\t]+"; + # sources_nr holds the number of error sources. + sources_nr = 0; + # codes_nr holds the number of error codes. +@@ -74,7 +74,7 @@ + } + + sources_header { +- if ($1 ~ /^[0123456789]+$/) ++ if ($0 ~ /^[0-9]+/) + { + sources_header = 0; + sources_body = 1; +@@ -88,7 +88,7 @@ + if (/^$/) + next; + +- if ($1 == "") ++ if ($0 !~ /^[0-9]+/) + { + sources_body = 0; + between_sources_and_codes = 1; +@@ -103,7 +103,7 @@ + } + + between_sources_and_codes { +- if ($1 ~ /^[0123456789]+$/) ++ if ($0 ~ /^[0-9]+/) + { + between_sources_and_codes = 0; + codes_body = 1; +@@ -117,7 +117,7 @@ + if (/^$/) + next; + +- if ($1 == "") ++ if ($0 !~ /^[0-9]+/) + { + codes_body = 0; + between_codes_and_errnos = 1; +@@ -132,7 +132,7 @@ + } + + between_codes_and_errnos { +- if ($1 ~ /^[0-9]/) ++ if ($0 ~ /^[0-9]+/) + { + between_codes_and_errnos = 0; + errnos_body = 1; +@@ -146,7 +146,7 @@ + if (/^$/) + next; + +- if ($1 !~ /^[0-9]/) ++ if ($0 !~ /^[0-9]+/) + { + # Note that this assumes that gpg-error.h.in doesn't start with a digit. + errnos_body = 0; |