summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-04 10:38:17 +0000
committerSascha Schumann <sas@php.net>2000-05-04 10:38:17 +0000
commitd0f3764ee2e10003d9c8ea4a1c17ff0be1303a9b (patch)
tree10e61089a99c0d3226533f4b15693a45d82a931a /acinclude.m4
parentb6e4841ec7bcdc1b4fd3533fd4ffeefdac095d52 (diff)
downloadphp-git-d0f3764ee2e10003d9c8ea4a1c17ff0be1303a9b.tar.gz
Change reentrancy API to always use the php prefix.
Check for the declaration of reentrant functions, so that we can use them in non-ZTS mode on all platforms.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m432
1 files changed, 31 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 31551a36ea..6ce670f417 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -4,6 +4,36 @@ dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
+AC_DEFUN(PHP_MISSING_TIME_R_DECL,[
+ AC_MSG_CHECKING(for missing declarations of reentrant functions)
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
+ :
+ ],[
+ AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
+ ])
+ AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
+ :
+ ],[
+ AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
+ ])
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
+ :
+ ],[
+ AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
+ ])
+ AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
+ :
+ ],[
+ AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
+ ])
+ AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
+ :
+ ],[
+ AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
+ ])
+ AC_MSG_RESULT(done)
+])
+
dnl
dnl PHP_LIBGCC_LIBPATH(gcc)
dnl Stores the location of libgcc in libgcc_libpath
@@ -96,7 +126,7 @@ EOF
])
AC_DEFUN(PHP_TIME_R_TYPE,[
-AC_CACHE_CHECK(for time_r type, ac_cv_time_r_type,[
+AC_CACHE_CHECK(for *time_r type, ac_cv_time_r_type,[
AC_TRY_RUN([
#include <time.h>
#include <stdlib.h>