This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (libf2c) libf77 getenv fix


Jeffrey A Law <law@upchuck.cygnus.com> writes:
> 
>   In message <199904121639.LAA25102@modi.xraylith.wisc.edu>you write:
>   > The following patch is needed on systems that require <stdlib.h> to
>   > be included to get the correct definition of environ.
>   > 
>   > Bootstraps ok on other systems as well (only tried i686-pc-linux-gnu
>   > other than the affected i386-pc-mingw32).
>   > 
>   > Mon Apr 12 11:35:56 1999  Mumit Khan  <khan@xraylith.wisc.edu>
>   > 	
>   > 	* libF77/getenv_.c: Include stdlib.h.
> This needs to be autoconf'd.
> 
> Use AC_CHECK_HEADER/AC_CHECK_HEADERS to check for stdlib.h.
> 
> Then in the code use something like
> 
> #ifdef HAVE_STDLIB_H
> #include <stdlib.h>
> #endif

Normally yes, but not in the cast of libF77 which liberally includes
stdlib.h in quite a few files and doesn't use autoconf config.h (although
we could pass the flags via CPPFLAGS).

It's ok if we change all the files, but that'll mean a deviation from 
the libf2c master sources. 

Craig?

Regards,
Mumit



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]