summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-04-01 16:00:34 +0000
committerSascha Schumann <sas@php.net>2000-04-01 16:00:34 +0000
commit179672a980afe1e0bd50a1c8598beb4e869f3297 (patch)
tree70161e7b7f2c19e86d6a455df836e65040620b6b /acinclude.m4
parent007c325cc1957ace7e244a150cea6f832d92219d (diff)
downloadphp-git-179672a980afe1e0bd50a1c8598beb4e869f3297.tar.gz
Fix the HPUX 10.20 check for non-standard reentrant time functions
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m47
1 files changed, 4 insertions, 3 deletions
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 <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);
}
],[