diff options
author | bouyer <bouyer@pkgsrc.org> | 2004-07-06 20:36:58 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2004-07-06 20:36:58 +0000 |
commit | 41084745a787e558a7bc49ea895ac2f0904a3520 (patch) | |
tree | 63d2c8c9548af7d8359f8b5b6fe3d00afda9c8b9 /textproc | |
parent | 92233ed67dc933158bba68a059334194dbaff770 (diff) | |
download | pkgsrc-41084745a787e558a7bc49ea895ac2f0904a3520.tar.gz |
Apply patch from
http://lists.gnu.org/archive/html/bug-gnu-utils/2002-03/msg00359.html
requested by Georg Schwarz in private mail: make it compile with non-gcc
compilers.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/grep/distinfo | 4 | ||||
-rw-r--r-- | textproc/grep/patches/patch-ab | 28 |
2 files changed, 26 insertions, 6 deletions
diff --git a/textproc/grep/distinfo b/textproc/grep/distinfo index e6825f14fed..00698942efe 100644 --- a/textproc/grep/distinfo +++ b/textproc/grep/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.5 2003/09/18 19:13:52 wiz Exp $ +$NetBSD: distinfo,v 1.6 2004/07/06 20:36:58 bouyer Exp $ SHA1 (grep-2.5.1.tar.bz2) = 551db1f0014e44d428e1c3482ac9418ff5d15950 Size (grep-2.5.1.tar.bz2) = 559232 bytes SHA1 (patch-aa) = f08f91903053a32c497c1a8a453116bfa9029ed6 -SHA1 (patch-ab) = 353f079d4b6c6853a16eb00c79462e32e8e1cf19 +SHA1 (patch-ab) = 2e92dab9e1a66ad5bc10f08faf68a0926fea6a87 SHA1 (patch-ac) = f0e672a0f29bc9a41e9918114e527f0ce1947f51 diff --git a/textproc/grep/patches/patch-ab b/textproc/grep/patches/patch-ab index 75c18f73a4a..158c9b8e84a 100644 --- a/textproc/grep/patches/patch-ab +++ b/textproc/grep/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1 2002/12/25 19:50:35 wiz Exp $ +$NetBSD: patch-ab,v 1.2 2004/07/06 20:36:58 bouyer Exp $ ---- src/dfa.c.orig Wed Sep 26 18:57:55 2001 -+++ src/dfa.c -@@ -44,7 +44,7 @@ extern void free(); +--- src/dfa.c.orig 2001-09-26 18:57:55.000000000 +0200 ++++ src/dfa.c 2004-07-06 22:33:02.000000000 +0200 +@@ -44,7 +44,7 @@ # include <locale.h> #endif @@ -11,3 +11,23 @@ $NetBSD: patch-ab,v 1.1 2002/12/25 19:50:35 wiz Exp $ /* We can handle multibyte string. */ # define MBS_SUPPORT #endif +@@ -1052,12 +1052,17 @@ + setbit_case_fold (c, ccl); + } else { + /* POSIX locales are painful - leave the decision to libc */ +- char expr[6] = { '[', c, '-', c2, ']', '\0' }; ++ char expr[6] = { '[', '\0', '-', '\0', ']', '\0' }; + regex_t re; ++ ++ expr[1] = c; ++ expr[3] = c2; + if (regcomp (&re, expr, case_fold ? REG_ICASE : 0) == REG_NOERROR) { + for (c = 0; c < NOTCHAR; ++c) { +- char buf[2] = { c, '\0' }; ++ char buf[2] = { '\0', '\0' }; + regmatch_t mat; ++ ++ buf[0] = c; + if (regexec (&re, buf, 1, &mat, 0) == REG_NOERROR + && mat.rm_so == 0 && mat.rm_eo == 1) + setbit_case_fold (c, ccl); |