[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strdup falsely detected when CFLAGS contains -ansi on MSYS/MinGW (gc
Re: strdup falsely detected when CFLAGS contains -ansi on MSYS/MinGW (gcc)
Mon, 29 Dec 2008 05:57:02 -0700
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20081105 Thunderbird/188.8.131.52 Mnenhy/0.7.5.666
-----BEGIN PGP SIGNED MESSAGE-----
According to Chris Pickett on 12/29/2008 2:25 AM:
>> 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.
AC_USE_SYSTEM_EXTENSIONS should come AFTER AC_PROG_CC. The other thing
that you need to realize is that AC_REPLACE_FUNCS([strdup]) merely checks
whether strdup is linkable (for your platform, it always is), not whether
it is declared (with -ansi, it is not). Therefore, you need to complement
it with AC_CHECK_DECLS([strdup]) and provide your own declaration of
strdup if HAVE_DECL_STRDUP is 0.
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----