bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] strerror_r: avoid compiler warning


From: Eric Blake
Subject: Re: [PATCH] strerror_r: avoid compiler warning
Date: Mon, 23 May 2011 14:15:43 -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 05/21/2011 12:02 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> @@ -48,7 +48,6 @@ AC_DEFUN([gl_FUNC_STRERROR_R],
>>               [AC_LANG_PROGRAM(
>>                  [[#include <errno.h>
>>                    #include <string.h>
>> -                  int strerror_r (int, char *, size_t);
>>                  ]],
>>                  [[int result = 0;
>>                    char buf[79];
> 
> This part doesn't look good to me. The line was meant to provide a declaration
> if the system's <string.h> doesn't.

But we don't get to this part of the m4 file unless we've already passed
the earlier part about checking if the strerror_r signature complies
with POSIX.  At which point, either that earlier test already passed
because the signatures were identical, or it passed because there was no
declaration at all.  In the former case, deleting the redundant
declaration here makes no difference; in the latter case, deleting the
only declaration here makes compilation fail (which is what we want,
since that means the system didn't really comply with POSIX after all).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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