changeset 14868:3b0e2e72c0a2

error: Avoid gcc warning. * lib/error.c (strerror_r): Declare also when its return type is 'int'.
author Bruno Haible <bruno@clisp.org>
date Sun, 05 Jun 2011 14:57:16 +0200
parents 355e7137b2de
children b8de6a14a6d5
files ChangeLog lib/error.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-05  Bruno Haible  <bruno@clisp.org>
+
+	error: Avoid gcc warning.
+	* lib/error.c (strerror_r): Declare also when its return type is 'int'.
+
 2011-06-05  Bruno Haible  <bruno@clisp.org>
 
 	unsetenv: Avoid gcc warning.
--- a/lib/error.c
+++ b/lib/error.c
@@ -97,11 +97,15 @@
 /* The gnulib override of fcntl is not needed in this file.  */
 # undef fcntl
 
-# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# if !HAVE_DECL_STRERROR_R
 #  ifndef HAVE_DECL_STRERROR_R
 "this configure-time declaration test was not run"
 #  endif
+#  if STRERROR_R_CHAR_P
 char *strerror_r ();
+#  else
+int strerror_r ();
+#  endif
 # endif
 
 /* The calling program should define program_name and set it to the