From: Sascha Schumann Date: Sat, 1 Apr 2000 16:00:34 +0000 (+0000) Subject: Fix the HPUX 10.20 check for non-standard reentrant time functions X-Git-Tag: php-4.0RC2~532 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=179672a980afe1e0bd50a1c8598beb4e869f3297;p=php Fix the HPUX 10.20 check for non-standard reentrant time functions --- diff --git a/acinclude.m4 b/acinclude.m4 index b0b0ec84e8..fa2e527f6d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -57,16 +57,17 @@ AC_DEFUN(PHP_TIME_R_TYPE,[ AC_CACHE_CHECK(for time_r type, ac_cv_time_r_type,[ AC_TRY_RUN([ #include +#include main() { char buf[27]; struct tm t; time_t old = 0; -int r; +int r, s; -gmtime_r(&old, &t); +s = gmtime_r(&old, &t); r = (int) asctime_r(&t, buf, 26); -if (r == -1 || (r > 0 && r <= 26)) exit(0); +if (r == s && s == 0) exit(0); exit(1); } ],[