1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

added check for strerror_r()

This commit is contained in:
Daniel Stenberg 2004-03-24 08:45:58 +00:00
parent 7cf47ea5b5
commit 242be55771
2 changed files with 22 additions and 1 deletions

View 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.

View 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