cvs: /php4 acconfig.h.in acinclude.m4 configure.in win95nt.h /php4/ext/standard datetime.c parsedate.y

From: Date: Sat, 01 Jan 2000 02:22:02 +0000
Subject: cvs: /php4 acconfig.h.in acinclude.m4 configure.in win95nt.h /php4/ext/standard datetime.c parsedate.y
Groups: php.version4 
Request: Send a blank email to php-version4+get-8762@lists.php.net to get a copy of this message
sas Fri Dec 31 21:22:02 1999 EDT Modified files: /php4 acconfig.h.in acinclude.m4 configure.in win95nt.h /php4/ext/standard datetime.c parsedate.y Log: Declare timezone only, if the system fails to do so. Index: php4/acconfig.h.in diff -u php4/acconfig.h.in:1.30 php4/acconfig.h.in:1.31 --- php4/acconfig.h.in:1.30 Sun Dec 19 15:08:40 1999 +++ php4/acconfig.h.in Fri Dec 31 21:22:00 1999 @@ -1,7 +1,5 @@ /* This is the default configuration file to read -*- C -*- */ -#undef socklen_t - /* these are defined by automake */ #undef PACKAGE #undef VERSION Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.56 php4/acinclude.m4:1.57 --- php4/acinclude.m4:1.56 Thu Dec 30 11:09:17 1999 +++ php4/acinclude.m4 Fri Dec 31 21:22:00 1999 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.56 1999/12/30 16:09:17 sas Exp $ +dnl $Id: acinclude.m4,v 1.57 2000/01/01 02:22:00 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -484,3 +484,22 @@ PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1" ]) +AC_DEFUN(PHP_DECLARED_TIMEZONE,[ + AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[ + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <time.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +],[ + time_t foo = (time_t) timezone; +],[ + ac_cv_declared_timezone=yes +],[ + ac_cv_declared_timezone=no +])]) + if test "$ac_cv_declared_timezone" = "yes"; then + AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone]) + fi +]) Index: php4/configure.in diff -u php4/configure.in:1.83 php4/configure.in:1.84 --- php4/configure.in:1.83 Thu Dec 30 03:03:55 1999 +++ php4/configure.in Fri Dec 31 21:22:00 1999 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.83 1999/12/30 08:03:55 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.84 2000/01/01 02:22:00 sas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -335,6 +335,7 @@ AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA AC_BROKEN_SPRINTF +PHP_DECLARED_TIMEZONE dnl AIX keeps in_addr_t in /usr/include/netinet/in.h dnl AC_MSG_CHECKING(for in_addr_t) Index: php4/win95nt.h diff -u php4/win95nt.h:1.1 php4/win95nt.h:1.2 --- php4/win95nt.h:1.1 Wed Apr 7 17:02:48 1999 +++ php4/win95nt.h Fri Dec 31 21:22:00 1999 @@ -1,4 +1,5 @@ /* Defines and types for Windows 95/NT */ +#define HAVE_DECLARED_TIMEZONE #define WIN32_LEAN_AND_MEAN #include <io.h> #include <malloc.h> Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.26 php4/ext/standard/datetime.c:1.27 --- php4/ext/standard/datetime.c:1.26 Fri Dec 31 20:31:49 1999 +++ php4/ext/standard/datetime.c Fri Dec 31 21:22:01 1999 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.26 2000/01/01 01:31:49 sas Exp $ */ +/* $Id: datetime.c,v 1.27 2000/01/01 02:22:01 sas Exp $ */ #include "php.h" @@ -53,7 +53,7 @@ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; -#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !(WIN32||WINNT) +#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE) extern time_t timezone; #endif Index: php4/ext/standard/parsedate.y diff -u php4/ext/standard/parsedate.y:1.14 php4/ext/standard/parsedate.y:1.15 --- php4/ext/standard/parsedate.y:1.14 Mon Dec 20 21:34:20 1999 +++ php4/ext/standard/parsedate.y Fri Dec 31 21:22:01 1999 @@ -1,5 +1,5 @@ %{ -/* $Revision: 1.14 $ +/* $Revision: 1.15 $ ** ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -46,14 +46,9 @@ #include <alloca.h> #endif -#if WIN32||WINNT -# include <time.h> -#else -# if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) +#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE) extern time_t timezone; -# endif #endif - #define yylhs date_yylhs #define yylen date_yylen

« previous php.version4 (#8762) next »