Nested declarations are easy to avoid, and doing so avoids at least
libvirt's choice of compiler warnings.
* lib/strerror_r.c (strerror_r): Hoist extern declaration to top
level.
Signed-off-by: Eric Blake
---
ChangeLog|4
lib/strerror_r.c |3 +--
2 files changed, 5 insertio
Hi Eric,
> 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
> >>#include
> >> - int strerror_r (int, char *, size_t);
On 05/25/2011 03:49 AM, Bruno Haible wrote:
>> 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).
>
> The usual gnulib approach is to provide the declaration only. This
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
>>#include
>> - int strerror_r (int, char *, size_t);
>> ]],
Eric Blake wrote:
> @@ -48,7 +48,6 @@ AC_DEFUN([gl_FUNC_STRERROR_R],
> [AC_LANG_PROGRAM(
> [[#include
> #include
> - int strerror_r (int, char *, size_t);
> ]],
> [[int result = 0;
>
A couple of copy-and-paste issues led to a compiler warning
during configure, detected on at least Solaris.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't return a char*.
Signed-off-by: Eric Blake
---
ChangeLog|5 -
m4/strerror_r.m4 |5 ++---
2 files changed, 6 insertions(+)