summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-24 08:45:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-24 08:45:58 +0000
commit242be5577142d181d2c90b727281a32d36f7b72b (patch)
treeb21acd0d2e9040e8f75dc134169541edcbe49b14
parent7cf47ea5b55247eb71906a6f93efc6c31aa37567 (diff)
downloadcurl-242be5577142d181d2c90b727281a32d36f7b72b.tar.gz
added check for strerror_r()
-rw-r--r--acinclude.m420
-rw-r--r--configure.ac3
2 files changed, 22 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 5acec28d2..b5865fc12 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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.
diff --git a/configure.ac b/configure.ac
index ea27e499d..36e5481cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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