'char **environ' woes with cygwin
Chris Faylor
cgf@cygnus.com
Thu Aug 24 13:34:00 GMT 2000
I've recently painfully learned that gdb explicitly declares 'char **environ'
all over the place.
This presents a problem for cygwin since environ is now being imported from
the cygwin DLL.
I've modified configure.in to egrep unistd.h for an environ declaration and
define HAVE_ENVIRON if unistd.h contains a declaration.
The question is, where do I put a:
#ifndef HAVE_ENVIRON
char **environ;
#endif
?
My initial choice was gdb's "environ.h" but that means that a number of files
need to include this just to get this declaration. So, I'm wondering if putting
this in defs.h is a better choice.
Can anyone tell me the best place to include this? I assume that
everyone agrees that putting the above in one header file is better than
sprinkling it throughout the sources.
cgf
More information about the Gdb
mailing list