From: Eric Blake Date: Fri, 20 May 2011 23:33:16 +0000 (-0600) Subject: strerror_r: avoid compiler warning X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec03cccf227537c78214a730d8de44bc7fb36489;p=pspp strerror_r: avoid compiler warning 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 --- diff --git a/ChangeLog b/ChangeLog index bda43a69aa..fafa86fbec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2011-05-20 Eric Blake - strerror_r: simplify AIX code. + strerror_r: avoid compiler warning + * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't return a char*. + + strerror_r: simplify AIX code * lib/strerror_r.c (strerror_r): Filter out buflen of 1 up front. test-perror: avoid spurious failure on FreeBSD diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 index 190472c959..13fb931a9b 100644 --- a/m4/strerror_r.m4 +++ b/m4/strerror_r.m4 @@ -1,4 +1,4 @@ -# strerror_r.m4 serial 6 +# strerror_r.m4 serial 7 dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R], [[#include int strerror_r (int, char *, size_t); ]], - [[return strerror (0);]])], + [])], [gl_cv_func_strerror_r_posix_signature=yes], [gl_cv_func_strerror_r_posix_signature=no]) ]) @@ -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; char buf[79];