Hi Andreas,
Andreas Schwab wrote:
Chris Pickett <[email protected]> writes:
When -ansi is passed to GCC, strdup becomes unavailable on MSYS/MinGW, but
autoconf still detects the existence of strdup. The mingw string.h is in
/mingw/include/string.h, and includes some funny stuff with #ifndef
__STRICT_ANSI__ and later #ifndef _NO_OLDNAMES. The former gets defined
by GCC with -ansi, the latter I couldn't see where it gets defined if at
all.
If you want to use extensions you should use AC_USE_SYSTEM_EXTENSIONS.
I tried adding this before AC_PROG_CC in my example and I get the same
result for mingw. I don't have a problem with not being able to use
platform extensions. However, if the extensions are not actually
available (because in this case I specified -ansi), I would like to be
able to use my own version (strdup.c). This seems to require autoconf
to tell me the extensions aren't there as a first step, at least if I'm
going the (LT)LIBOBJS way.
Cheers,
Chris