[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: |
Eric Blake |
Subject: |
Re: strdup falsely detected when CFLAGS contains -ansi on MSYS/MinGW (gcc) |
Date: |
Mon, 29 Dec 2008 05:57:02 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
iEYEARECAAYFAklYyR4ACgkQ84KuGfSFAYA8oACgjAvXUiJMQqGjn2HT+v9wkMjT
3kUAnjg2L2XqT3Ek47KqyY79hdEH6RYe
=yx2A
-----END PGP SIGNATURE-----