]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
added check for strerror_r()
authorDaniel Stenberg <daniel@haxx.se>
Wed, 24 Mar 2004 08:45:58 +0000 (08:45 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 24 Mar 2004 08:45:58 +0000 (08:45 +0000)
acinclude.m4
configure.ac

index 5acec28d2b6eea4ce1d006141a7965eb3365bb61..b5865fc1224800e30e20a8ba9fa359d351c0bd66 100644 (file)
@@ -279,7 +279,7 @@ fi
 
 AC_DEFUN([CURL_CHECK_LOCALTIME_R],
 [
-  dnl check for a few thread-safe functions
+  dnl check for localtime_r
   AC_CHECK_FUNCS(localtime_r,[
     AC_MSG_CHECKING(whether localtime_r is declared)
     AC_EGREP_CPP(localtime_r,[
@@ -295,6 +295,24 @@ AC_DEFUN([CURL_CHECK_LOCALTIME_R],
        AC_MSG_RESULT(no))])])
 ])
 
+AC_DEFUN([CURL_CHECK_STRERROR_R],
+[
+  dnl determine of strerror_r is present
+  AC_CHECK_FUNCS(strerror_r,[
+    AC_MSG_CHECKING(whether strerror_r is declared)
+    AC_EGREP_CPP(strerror_r,[
+#include <string.h>],[
+      AC_MSG_RESULT(yes)],[
+      AC_MSG_RESULT(no)
+      AC_MSG_CHECKING(whether strerror_r with -D_REENTRANT is declared)
+      AC_EGREP_CPP(strerror_r,[
+#define _REENTRANT
+#include <string.h>],[
+       AC_DEFINE(NEED_REENTRANT)
+       AC_MSG_RESULT(yes)],
+       AC_MSG_RESULT(no))])])
+])
+
 AC_DEFUN([CURL_CHECK_INET_NTOA_R],
 [
   dnl determine if function definition for inet_ntoa_r exists.
index ea27e499db664785bb3464e70c2a2a5f0dc7cc3a..36e5481cb43f998638b0bde4a2a421afc301956e 100644 (file)
@@ -952,6 +952,9 @@ else
   dnl is there a localtime_r()
   CURL_CHECK_LOCALTIME_R()
 
+  dnl is there a strerror_r()
+  CURL_CHECK_STRERROR_R()
+
   AC_CHECK_FUNCS( gmtime_r )
 
 fi