[PATCH] strerror_r: avoid compiler warning

2012-03-29 Thread Eric Blake
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

Re: [PATCH] strerror_r: avoid compiler warning

2011-05-25 Thread Bruno Haible
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);

Re: [PATCH] strerror_r: avoid compiler warning

2011-05-25 Thread Eric Blake
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

Re: [PATCH] strerror_r: avoid compiler warning

2011-05-23 Thread Eric Blake
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); >> ]],

Re: [PATCH] strerror_r: avoid compiler warning

2011-05-21 Thread Bruno Haible
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; >              

[PATCH] strerror_r: avoid compiler warning

2011-05-20 Thread Eric Blake
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(+)