]> granicus.if.org Git - php/commitdiff
Fix the HPUX 10.20 check for non-standard reentrant time functions
authorSascha Schumann <sas@php.net>
Sat, 1 Apr 2000 16:00:34 +0000 (16:00 +0000)
committerSascha Schumann <sas@php.net>
Sat, 1 Apr 2000 16:00:34 +0000 (16:00 +0000)
acinclude.m4

index b0b0ec84e8e7d0caae894f7be7fb0bc49b2507c0..fa2e527f6d147ff3428564aa51fb59e9db16409b 100644 (file)
@@ -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 <time.h>
+#include <stdlib.h>
 
 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);
 }
 ],[