--------------------- PatchSet 847 Date: 2003/08/03 20:40:06 Author: serassio Branch: nt Tag: (none) Log: A better fix to let GNUregex to build on MinGW (Thanks to Henrik) Members: include/GNUregex.h:1.1->1.1.2.1 lib/GNUregex.c:1.1.2.2->1.1.2.3 Index: squid3/include/GNUregex.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/GNUregex.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- squid3/include/GNUregex.h 14 Oct 2002 00:18:18 -0000 1.1 +++ squid3/include/GNUregex.h 3 Aug 2003 20:40:38 -0000 1.1.2.1 @@ -1,5 +1,5 @@ /* - * $Id: GNUregex.h,v 1.1 2002/10/14 00:18:18 squidadm Exp $ + * $Id: GNUregex.h,v 1.1.2.1 2003/08/03 20:40:38 serassio Exp $ */ #ifndef SQUID_REGEXP_LIBRARY_H @@ -466,7 +466,7 @@ unsigned num_regs, regoff_t * starts, regoff_t * ends)); /* 4.2 bsd compatibility. */ -extern char *re_comp _RE_ARGS((const char *)); +extern const char *re_comp _RE_ARGS((const char *)); extern int re_exec _RE_ARGS((const char *)); /* POSIX compatibility. */ Index: squid3/lib/GNUregex.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/GNUregex.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/lib/GNUregex.c 3 Aug 2003 18:27:27 -0000 1.1.2.2 +++ squid3/lib/GNUregex.c 3 Aug 2003 20:40:06 -0000 1.1.2.3 @@ -1,5 +1,5 @@ /* - * $Id: GNUregex.c,v 1.1.2.2 2003/08/03 18:27:27 serassio Exp $ + * $Id: GNUregex.c,v 1.1.2.3 2003/08/03 20:40:06 serassio Exp $ */ /* Extended regular expression matching and search library, @@ -4432,7 +4432,7 @@ /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; -char * +const char * re_comp(s) const char *s; { @@ -4440,18 +4440,18 @@ if (!s) { if (!re_comp_buf.buffer) - return (char *) "No previous regular expression"; + return "No previous regular expression"; return 0; } if (!re_comp_buf.buffer) { re_comp_buf.buffer = (unsigned char *) malloc(200); if (re_comp_buf.buffer == NULL) - return (char *) "Memory exhausted"; + return "Memory exhausted"; re_comp_buf.allocated = 200; re_comp_buf.fastmap = (char *) malloc(1 << BYTEWIDTH); if (re_comp_buf.fastmap == NULL) - return (char *) "Memory exhausted"; + return "Memory exhausted"; } /* Since `re_exec' always passes NULL for the `regs' argument, we * don't need to initialize the pattern buffer fields which affect it. */