Subject: Re: defining POSIX when building gcc?
To: Bill Sommerfeld <firstname.lastname@example.org>
From: Simon Burge <email@example.com>
Date: 08/10/1999 14:01:16
Bill Sommerfeld wrote:
> Currently, when you link gcc, you get the following warning:
> cc -o cc1 c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o c-parse.o c-lang.o /usr/src/gn
> getpwd.o: warning: getwd() possibly used unsafely, consider using getcwd()
> Now, if bits of gcc were built -DPOSIX, this wouldn't happen.
The real problem with this particular instance is in getpwd.c:
#if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD)
It would be easier to wrap the whole test in !defined(HAVE_GETPWD) and
define that in dist/gcc/config/netbsd.h.
FWIW, I just tried to build egcs with your patch to define POSIX, and
it worked ok - however, would it be more correct to put that define in