From 1328bbc774a400edaf6a47401668e11c27473f31 Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 8 Dec 2005 17:24:32 +0000 Subject: Since this is compiled with -Werror and GCC 3.4 doesn't like the string const cast-away, pass down the constness. --- textproc/bsdgrep-devel/distinfo | 11 +++---- textproc/bsdgrep-devel/patches/patch-ab | 26 ++++++++++++++--- textproc/bsdgrep-devel/patches/patch-ac | 26 ++++++++++++++--- textproc/bsdgrep-devel/patches/patch-ad | 17 ++++++++--- textproc/bsdgrep-devel/patches/patch-ae | 21 ++++++++++---- textproc/bsdgrep-devel/patches/patch-ag | 51 +++++++++++++++++++++++++++++++++ 6 files changed, 129 insertions(+), 23 deletions(-) create mode 100644 textproc/bsdgrep-devel/patches/patch-ag (limited to 'textproc') diff --git a/textproc/bsdgrep-devel/distinfo b/textproc/bsdgrep-devel/distinfo index 22f73908fc9..543725b2623 100644 --- a/textproc/bsdgrep-devel/distinfo +++ b/textproc/bsdgrep-devel/distinfo @@ -1,11 +1,12 @@ -$NetBSD: distinfo,v 1.7 2005/02/24 14:48:40 agc Exp $ +$NetBSD: distinfo,v 1.8 2005/12/08 17:24:32 joerg Exp $ SHA1 (bsdgrep-200405051607.tar.gz) = 0a50caa04dab9ee576bb30f4abf62e03378d4f0e RMD160 (bsdgrep-200405051607.tar.gz) = 50b188e6f47d90491300a6310167dec17a5b927b Size (bsdgrep-200405051607.tar.gz) = 12972 bytes SHA1 (patch-aa) = c147bb05387e01b6f7e0ec8a918b09e77da2103c -SHA1 (patch-ab) = c7fa54dedb0925d342549cbc56197bf2d8e4e47b -SHA1 (patch-ac) = e5b3d3a2bc069f123a7f568f72ded291f3ac49ea -SHA1 (patch-ad) = 8080d6fa8f5faa40055ad1f067c1669d682956d2 -SHA1 (patch-ae) = 2907cd5e82f6c6721afd470099ccf9f2b2f392c4 +SHA1 (patch-ab) = b58c0439b6406e4a50ee26f4763d3dfb6830319e +SHA1 (patch-ac) = 8c6cbf34711938f84df112663bfe3fa99e61fe18 +SHA1 (patch-ad) = a94ea4611ad82cdd4dfcf709b0e5734f253428d1 +SHA1 (patch-ae) = e01d52d055abada35479e14ed331112622b17d22 SHA1 (patch-af) = 64e270f9c8d3df2994af83044de7ab3e47dc6415 +SHA1 (patch-ag) = e99328b3f66bc33f3c01c7a3d5e14434a4cd822e diff --git a/textproc/bsdgrep-devel/patches/patch-ab b/textproc/bsdgrep-devel/patches/patch-ab index 37e562fcea2..71f6c66fc7f 100644 --- a/textproc/bsdgrep-devel/patches/patch-ab +++ b/textproc/bsdgrep-devel/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ +$NetBSD: patch-ab,v 1.2 2005/12/08 17:24:32 joerg Exp $ ---- file.c.orig Wed Aug 27 12:59:52 2003 -+++ file.c Wed Aug 27 13:00:09 2003 -@@ -34,10 +34,10 @@ +--- file.c.orig 2004-01-02 15:00:27.000000000 +0000 ++++ file.c +@@ -34,10 +34,10 @@ __RCSID("$NetBSD: file.c,v 1.1.1.2 2004/ #include @@ -14,3 +14,21 @@ $NetBSD: patch-ab,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ #include "grep.h" +@@ -122,7 +122,7 @@ gzfgetln(gzFile *f, size_t *len) + } + + file_t * +-grep_fdopen(int fd, char *mode) ++grep_fdopen(int fd, const char *mode) + { + file_t *f; + +@@ -148,7 +148,7 @@ grep_fdopen(int fd, char *mode) + } + + file_t * +-grep_open(char *path, char *mode) ++grep_open(const char *path, const char *mode) + { + file_t *f; + diff --git a/textproc/bsdgrep-devel/patches/patch-ac b/textproc/bsdgrep-devel/patches/patch-ac index 4cc1a33bc2f..313cab7adf2 100644 --- a/textproc/bsdgrep-devel/patches/patch-ac +++ b/textproc/bsdgrep-devel/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ +$NetBSD: patch-ac,v 1.2 2005/12/08 17:24:32 joerg Exp $ ---- grep.c.orig Wed Aug 27 13:00:48 2003 -+++ grep.c Wed Aug 27 13:01:03 2003 -@@ -37,6 +37,7 @@ +--- grep.c.orig 2004-05-05 14:34:55.000000000 +0000 ++++ grep.c +@@ -37,6 +37,7 @@ __RCSID("$NetBSD: grep.c,v 1.2 2004/05/0 #include #include @@ -10,3 +10,21 @@ $NetBSD: patch-ac,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ #include #include #include +@@ -111,7 +112,7 @@ int binbehave = BIN_FILE_BIN; + int dirbehave = GREP_READ; + int devbehave = GREP_READ; + /*int linkbehave = LINK_FOLLOW;*/ +-char *stdin_label; ++const char *stdin_label; + + enum { + BIN_OPT = CHAR_MAX + 1, +@@ -137,7 +138,7 @@ usage(void) + exit(2); + } + +-static char *optstr = "0123456789A:B:C:D:EFGHILUVZabcd:e:f:hilm:noqrsuvwxyz"; ++static const char optstr[] = "0123456789A:B:C:D:EFGHILUVZabcd:e:f:hilm:noqrsuvwxyz"; + + struct option long_options[] = + { diff --git a/textproc/bsdgrep-devel/patches/patch-ad b/textproc/bsdgrep-devel/patches/patch-ad index 90dbd1500a2..b3ed950094b 100644 --- a/textproc/bsdgrep-devel/patches/patch-ad +++ b/textproc/bsdgrep-devel/patches/patch-ad @@ -1,8 +1,8 @@ -$NetBSD: patch-ad,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ +$NetBSD: patch-ad,v 1.2 2005/12/08 17:24:32 joerg Exp $ ---- mmfile.c.orig Wed Aug 27 13:01:21 2003 -+++ mmfile.c Wed Aug 27 13:01:42 2003 -@@ -36,6 +36,7 @@ +--- mmfile.c.orig 2004-01-02 15:00:34.000000000 +0000 ++++ mmfile.c +@@ -36,6 +36,7 @@ __RCSID("$NetBSD: mmfile.c,v 1.1.1.2 200 #include #include @@ -10,3 +10,12 @@ $NetBSD: patch-ad,v 1.1.1.1 2003/08/31 09:37:51 cjep Exp $ #include #include #include +@@ -46,7 +47,7 @@ __RCSID("$NetBSD: mmfile.c,v 1.1.1.2 200 + #define MAX_MAP_LEN 1048576 + + mmf_t * +-mmopen(char *fn, char *mode) ++mmopen(const char *fn, const char *mode) + { + mmf_t *mmf; + struct stat st; diff --git a/textproc/bsdgrep-devel/patches/patch-ae b/textproc/bsdgrep-devel/patches/patch-ae index efe0a6bc2d9..035dbbbd946 100644 --- a/textproc/bsdgrep-devel/patches/patch-ae +++ b/textproc/bsdgrep-devel/patches/patch-ae @@ -1,8 +1,8 @@ -$NetBSD: patch-ae,v 1.2 2004/12/21 16:09:44 agc Exp $ +$NetBSD: patch-ae,v 1.3 2005/12/08 17:24:32 joerg Exp $ ---- util.c.orig Wed Aug 27 13:01:54 2003 -+++ util.c Wed Aug 27 13:02:02 2003 -@@ -36,6 +36,7 @@ +--- util.c.orig 2004-01-02 15:00:34.000000000 +0000 ++++ util.c +@@ -36,6 +36,7 @@ __RCSID("$NetBSD: util.c,v 1.1.1.2 2004/ #include #include @@ -10,7 +10,7 @@ $NetBSD: patch-ae,v 1.2 2004/12/21 16:09:44 agc Exp $ #include #include #include -@@ -44,7 +45,6 @@ +@@ -44,7 +45,6 @@ __RCSID("$NetBSD: util.c,v 1.1.1.2 2004/ #include #include #include @@ -18,7 +18,16 @@ $NetBSD: patch-ae,v 1.2 2004/12/21 16:09:44 agc Exp $ #include "grep.h" -@@ -228,8 +228,8 @@ +@@ -99,7 +99,7 @@ grep_tree(char **argv) + } + + int +-procfile(char *fn) ++procfile(const char *fn) + { + str_t ln; + file_t *f; +@@ -228,8 +228,8 @@ procline(str_t *l, int nottext) continue; if (r == 0) { if (wflag) { diff --git a/textproc/bsdgrep-devel/patches/patch-ag b/textproc/bsdgrep-devel/patches/patch-ag new file mode 100644 index 00000000000..f7984eff845 --- /dev/null +++ b/textproc/bsdgrep-devel/patches/patch-ag @@ -0,0 +1,51 @@ +$NetBSD: patch-ag,v 1.1 2005/12/08 17:24:32 joerg Exp $ + +--- grep.h.orig 2004-05-05 15:06:33.000000000 +0000 ++++ grep.h +@@ -52,7 +52,7 @@ typedef struct { + size_t len; + int line_no; + int off; +- char *file; ++ const char *file; + char *dat; + } str_t; + +@@ -77,7 +77,7 @@ extern int zgrep; + + extern int binbehave, dirbehave, devbehave; + /* extern int linkbehave; */ +-extern char *stdin_label; ++extern const char *stdin_label; + + extern int first, matchall, patterns, tail; + extern char **pattern; +@@ -91,7 +91,7 @@ extern regex_t *r_pattern; + extern char re_error[RE_ERROR_BUF + 1]; + + /* util.c */ +-int procfile(char *fn); ++int procfile(const char *fn); + int grep_tree(char **argv); + + void *grep_malloc(size_t size); +@@ -111,7 +111,7 @@ typedef struct mmfile { + char *base, *end, *ptr; + } mmf_t; + +-mmf_t *mmopen(char *fn, char *mode); ++mmf_t *mmopen(const char *fn, const char *mode); + void mmclose(mmf_t *mmf); + char *mmfgetln(mmf_t *mmf, size_t *l); + void mmrewind(mmf_t *mmf); +@@ -120,8 +120,8 @@ void mmrewind(mmf_t *mmf); + struct file; + typedef struct file file_t; + +-file_t *grep_fdopen(int fd, char *mode); +-file_t *grep_open(char *path, char *mode); ++file_t *grep_fdopen(int fd, const char *mode); ++file_t *grep_open(const char *path, const char *mode); + + int grep_bin_file(file_t *f); + char *grep_fgetln(file_t *f, size_t *l); -- cgit v1.2.3