[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strdup falsely detected when CFLAGS contains -ansi on MSYS/MinGW (gc

From: Chris Pickett
Subject: Re: strdup falsely detected when CFLAGS contains -ansi on MSYS/MinGW (gcc)
Date: Mon, 29 Dec 2008 04:25:45 -0500
User-agent: Thunderbird (Macintosh/20071210)

Hi Andreas,

Andreas Schwab wrote:
Chris Pickett <address@hidden> 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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]