Date: Sun, 24 Mar 2002 12:40:09 -0800 (PST) From: Alan Eldridge <alane@geeksrus.net> To: freebsd-ports@FreeBSD.org Subject: Re: ports/36254: Conflicting function definition with standard libraries Message-ID: <200203242040.g2OKe9c23224@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/36254; it has been noted by GNATS. From: Alan Eldridge <alane@geeksrus.net> To: Jerome Mainka <mainka@ixo.fr> Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: ports/36254: Conflicting function definition with standard libraries Date: Sun, 24 Mar 2002 15:35:34 -0500 On Sun, Mar 24, 2002 at 08:04:54AM -0800, Jerome Mainka wrote: > >>Number: 36254 >>Category: ports >>Synopsis: Conflicting function definition with standard libraries >>Environment: >FreeBSD gandalf 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Mar 24 12:38:05 CET 2002 >>Description: >the function strnstr defined in libs/libwww/HTReader.c:80 is already defined in /usr/include/string.h:93 > >A make in /usr/ports/print/teTeX doesn't succeed On the surface, this PR and patch are not correct. 1. teTex should not be using the libwww in its own tree; according to the Makefile, it should be using the installed port, instead. Problem is with submitter's system; need to see full configure and make logs to determine what actually happened. 2. Ignoring the fact that the implicated code should not be used anyway, the suggested patch would be wrong in any event for the following reasons: 2a. Prototype doesn't match, disregarding constness, the one in <string.h>, which is (const char *,const char*, size_t); the two functions are not the same. That is, the code should not compile correctly if the function is removed. 2b. If the function *could* be removed, which it can't, the correct way of removing the function would be to use the preprocessor to remove it. This eliminates the patch's dependence on the exact function implementation. -- AlanE "When the going gets weird, the weird turn pro." - HST 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?200203242040.g2OKe9c23224>