[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error: avoid gcc warning
From: |
Eric Blake |
Subject: |
Re: error: avoid gcc warning |
Date: |
Mon, 06 Jun 2011 16:45:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 06/05/2011 07:00 AM, Bruno Haible wrote:
> On OSF/1 5.1 with gcc, I'm seeing this warning:
>
> error.c:170: warning: implicit declaration of function 'strerror_r'
>
> It's because /usr/include/string.h on this system does not always declare
> strerror_r (only if _REENTRANT or _THREAD_SAFE is defined). This fixes it
> (without requiring the 'strerror_r' module).
This raises an interesting question. The 'error' module should probably
depend on strerror_r, not strerror.
>
> -# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
> +# if !HAVE_DECL_STRERROR_R
at which point, this is the wrong compile-time check, since use of the
strerror_r-posix module would guarantee a declaration, even when
!HAVE_DECL_STRERROR_R.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature