pkgsrc/security/libgpg-error/patches/patch-ae
kim 245cd1880b 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.
2005-12-29 16:09:42 +00:00

25 lines
597 B
Text

$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 "";