Date: Fri, 7 Dec 2001 00:00:01 -0800 (PST) From: Anton Berezin <tobez@tobez.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/32571: build broken on eperl Message-ID: <200112070800.fB7801q84911@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/32571; it has been noted by GNATS. From: Anton Berezin <tobez@tobez.org> To: Beech Rintoul <akbeech@anchoragerescue.org> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/32571: build broken on eperl Date: Fri, 7 Dec 2001 08:50:31 +0100 On Thu, Dec 06, 2001 at 10:49:34PM -0800, Beech Rintoul wrote: > ===> Building for eperl-2.2.14 > cc -fno-strict-aliasing -DAPPLLIB_EXP="/usr/libdata/perl/BSDPAN" -I/usr/libdata/perl/5.6.0/mach/CORE -I. -c eperl_main.c > In file included from eperl_main.c:41: > eperl_proto.h:82: conflicting types for `strnstr' > /usr/include/string.h:93: previous declaration of `strnstr' > *** Error code 1 > > Stop in /usr/ports/lang/eperl/work/eperl-2.2.14. > *** Error code 1 Try to add the following patch as /usr/ports/lang/eperl/files/patch-strnstr : --- eperl_parse.c.orig Fri Dec 7 08:46:17 2001 +++ eperl_parse.c Fri Dec 7 08:45:27 2001 @@ -298,7 +298,7 @@ return NULL; } -char *strnstr(char *buf, char *str, int n) +char *my_strnstr(char *buf, char *str, int n) { char *cp; char *cpe; @@ -378,7 +378,7 @@ while (cps < cpEND) { if (ePerl_case_sensitive_delimiters) - cpe = strnstr(cps, ePerl_begin_delimiter, cpEND-cps); + cpe = my_strnstr(cps, ePerl_begin_delimiter, cpEND-cps); else cpe = strncasestr(cps, ePerl_begin_delimiter, cpEND-cps); if (cpe == NULL) { @@ -476,7 +476,7 @@ /* move forward to end of ePerl block. */ if (ePerl_case_sensitive_delimiters) - cpe = strnstr(cpe, ePerl_end_delimiter, cpEND-cpe); + cpe = my_strnstr(cpe, ePerl_end_delimiter, cpEND-cpe); else cpe = strncasestr(cpe, ePerl_end_delimiter, cpEND-cpe); if (cpe == NULL) { --- eperl_pp.c.orig Fri Dec 7 08:46:21 2001 +++ eperl_pp.c Fri Dec 7 08:45:27 2001 @@ -168,13 +168,13 @@ if ((strncmp(cps, "#endif", 6) == 0) && (cp == NULL)) cp = cps; if ((strncmp(cps, "#c", 2) == 0) && (cp == NULL)) cp = cps; } - if (((cpT = strnstr(cps, "\n#include", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#sinclude", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#if", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#elsif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#else", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#endif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; - if (((cpT = strnstr(cps, "\n#c", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#include", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#sinclude", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#if", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#elsif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#else", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#endif", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; + if (((cpT = my_strnstr(cps, "\n#c", cpEND-cps)) != NULL) && ((cpT < cp) || (cp == NULL))) cp = cpT+1; if (cp != NULL && (cp == cpBuf || (cp > cpBuf && *(cp-1) == '\n'))) { /* --- eperl_proto.h.orig Fri Dec 7 08:46:26 2001 +++ eperl_proto.h Fri Dec 7 08:45:27 2001 @@ -79,7 +79,7 @@ extern char *ePerl_Efwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); extern char *ePerl_Cfwrite(char *cpBuf, int nBuf, int cNum, char *cpOut); extern char *strnchr(char *buf, char chr, int n); -extern char *strnstr(char *buf, char *str, int n); +extern char *my_strnstr(char *buf, char *str, int n); extern char *strncasestr(char *buf, char *str, int n); extern char *strndup(char *buf, int n); extern char *ePerl_Bristled2Plain(char *cpBuf); Cheers, +Anton. -- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez@catpipe.net (_(_|| | tobez@FreeBSD.org | | +45 7021 0050 | Private: tobez@tobez.org | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112070800.fB7801q84911>