error: Avoid gcc warning.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 12:57:16 +0000 (14:57 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 12:57:16 +0000 (14:57 +0200)
* lib/error.c (strerror_r): Declare also when its return type is 'int'.

ChangeLog
lib/error.c

index d41786c..54373d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
        * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it.
 
index a2d1c1b..7482baa 100644 (file)
@@ -97,11 +97,15 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
 /* 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