bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] perror: work around FreeBSD bug


From: Bruno Haible
Subject: Re: [PATCH 3/3] perror: work around FreeBSD bug
Date: Wed, 25 May 2011 01:03:42 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> I'm still seeing perror failures on at least
> AIX and Irix, due to strerror_r but not perror being replaced.  I'm not
> quite sure of the right m4 fix to make, but hopefully I can fix this
> soon (first, though, I plan on completing my strerror_r work).

I'm applying one of the patches from the "better use of AC_LIBOBJ" patch
series. Now, you can change gl_FUNC_PERROR to require gl_FUNC_STRERROR_R
and then test the values of HAVE_DECL_STRERROR_R and REPLACE_STRERROR_R.


2011-05-24  Bruno Haible  <address@hidden>

        strerror_r-posix: Respect rules for use of AC_LIBOBJ.
        * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move AC_LIBOBJ and
        gl_PREREQ_STRERROR_R invocations from here...
        * modules/strerror_r-posix (configure.ac): ... to here.

diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4
index ddaf10f..1c0af36 100644
--- a/m4/strerror_r.m4
+++ b/m4/strerror_r.m4
@@ -1,4 +1,4 @@
-# strerror_r.m4 serial 8
+# strerror_r.m4 serial 9
 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,
@@ -100,10 +100,6 @@ changequote([,])dnl
       REPLACE_STRERROR_R=1
     fi
   fi
-  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
-    AC_LIBOBJ([strerror_r])
-    gl_PREREQ_STRERROR_R
-  fi
 ])
 
 # Prerequisites of lib/strerror_r.c.
diff --git a/modules/strerror_r-posix b/modules/strerror_r-posix
index a36f2e6..90c9806 100644
--- a/modules/strerror_r-posix
+++ b/modules/strerror_r-posix
@@ -13,6 +13,10 @@ lock            [test $HAVE_DECL_STRERROR_R = 0 || test 
$REPLACE_STRERROR_R = 1]
 
 configure.ac:
 gl_FUNC_STRERROR_R
+if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
+  AC_LIBOBJ([strerror_r])
+  gl_PREREQ_STRERROR_R
+fi
 gl_STRING_MODULE_INDICATOR([strerror_r])
 
 Makefile.am:

-- 
In memoriam Georges Darboy <http://en.wikipedia.org/wiki/Georges_Darboy>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]