diff options
author | Sascha Schumann <sas@php.net> | 2000-03-03 16:10:38 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-03-03 16:10:38 +0000 |
commit | 3bfe29fddbdd2817889a25bbec89fd8c7caa0db0 (patch) | |
tree | 7817149d0d639705db119690d88a09babf570005 /acinclude.m4 | |
parent | b053e6422fee27acae2fc5888890525bbc6a2298 (diff) | |
download | php-git-3bfe29fddbdd2817889a25bbec89fd8c7caa0db0.tar.gz |
Support HP-UX 10.x non-standard time-related reentrant functions
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 97ec99c09a..0d0b898f4d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,6 +2,35 @@ dnl $Id$ dnl dnl This file contains local autoconf functions. +AC_DEFUN(PHP_TIME_R_TYPE,[ +AC_CACHE_CHECK(for time_r type, ac_cv_time_r_type,[ +AC_TRY_RUN([ +#include <time.h> + +main() { +char buf[27]; +struct tm t; +time_t old = 0; +int r; + +gmtime_r(&old, &t); +r = (int) asctime_r(&t, buf, 26); +if (r == -1 || (r > 0 && r <= 26)) exit(0); +exit(1); +} +],[ + ac_cv_time_r_type=hpux +],[ + ac_cv_time_r_type=normal +],[ + ac_cv_time_r_type=normal +]) +]) +if test "$ac_cv_time_r_type" = "hpux"; then + AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-SUX 10.x]) +fi +]) + AC_DEFUN(PHP_SUBST,[ PHP_VAR_SUBST="$PHP_VAR_SUBST $1" AC_SUBST($1) |