cvs: /php3 ChangeLog aclocal.m4 configure.in win95nt.h /php3/functions datetime.c parsedate.y

From: Date: Sat, 01 Jan 2000 02:31:24 +0000
Subject: cvs: /php3 ChangeLog aclocal.m4 configure.in win95nt.h /php3/functions datetime.c parsedate.y
Groups: php.dev 
Request: Send a blank email to php-dev+get-14179@lists.php.net to get a copy of this message
sas Fri Dec 31 21:31:24 1999 EDT Modified files: /php3 ChangeLog aclocal.m4 configure.in win95nt.h /php3/functions datetime.c parsedate.y Log: Fix for #3015. Declare timezone only, if the system fails to do so. Index: php3/ChangeLog diff -u php3/ChangeLog:1.804 php3/ChangeLog:1.805 --- php3/ChangeLog:1.804 Wed Dec 29 11:30:24 1999 +++ php3/ChangeLog Fri Dec 31 21:30:52 1999 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Jan.1, 2000, Version 3.0.13 +- Fixed timezone conflict on AIX (Sascha) - Fixed mysql_errno() problem when compiled against MySQL 3.23.x (Rasmus) - Fixed buffer overruns in iptcembed(). (Thies) - OCI8 now returns NULL values in LONG columns correct. (Thies) Index: php3/aclocal.m4 diff -u php3/aclocal.m4:1.48 php3/aclocal.m4:1.49 --- php3/aclocal.m4:1.48 Tue Nov 16 09:24:36 1999 +++ php3/aclocal.m4 Fri Dec 31 21:30:52 1999 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.48 1999/11/16 14:24:36 kk Exp $ +dnl $Id: aclocal.m4,v 1.49 2000/01/01 02:30:52 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -677,3 +677,22 @@ esac ]) +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: php3/configure.in diff -u php3/configure.in:1.483 php3/configure.in:1.484 --- php3/configure.in:1.483 Mon Dec 20 13:07:35 1999 +++ php3/configure.in Fri Dec 31 21:30:52 1999 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.483 1999/12/20 18:07:35 rasmus Exp $ +dnl $Id: configure.in,v 1.484 2000/01/01 02:30:52 sas Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) @@ -263,6 +263,8 @@ AC_FUNC_ALLOCA AC_BROKEN_SPRINTF AC_REPLACE_FUNCS(getopt) + +PHP_DECLARED_TIMEZONE dnl AIX keeps in_addr_t in /usr/include/netinet/in.h dnl AC_MSG_CHECKING(for in_addr_t) Index: php3/win95nt.h diff -u php3/win95nt.h:1.23 php3/win95nt.h:1.24 --- php3/win95nt.h:1.23 Mon Jun 28 15:50:40 1999 +++ php3/win95nt.h Fri Dec 31 21:30:52 1999 @@ -1,6 +1,7 @@ -/* $Id: win95nt.h,v 1.23 1999/06/28 19:50:40 jim Exp $ */ +/* $Id: win95nt.h,v 1.24 2000/01/01 02:30:52 sas Exp $ */ /* Defines and types for Windows 95/NT */ +#define HAVE_DECLARED_TIMEZONE #define WIN32_LEAN_AND_MEAN #include <io.h> #include <malloc.h> Index: php3/functions/datetime.c diff -u php3/functions/datetime.c:1.78 php3/functions/datetime.c:1.79 --- php3/functions/datetime.c:1.78 Mon Dec 27 04:01:35 1999 +++ php3/functions/datetime.c Fri Dec 31 21:30:53 1999 @@ -28,7 +28,7 @@ | Rasmus Lerdorf <rasmus@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: datetime.c,v 1.78 1999/12/27 09:01:35 fmk Exp $ */ +/* $Id: datetime.c,v 1.79 2000/01/01 02:30:53 sas Exp $ */ #include "php.h" #include "internal_functions.h" #include "operators.h" @@ -63,11 +63,8 @@ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; -#ifndef HAVE_TM_ZONE -#ifndef _TIMEZONE +#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE) extern time_t timezone; -extern char *tzname[2]; -#endif #endif static int phpday_tab[2][12] = Index: php3/functions/parsedate.y diff -u php3/functions/parsedate.y:1.9 php3/functions/parsedate.y:1.10 --- php3/functions/parsedate.y:1.9 Fri Jul 16 14:05:01 1999 +++ php3/functions/parsedate.y Fri Dec 31 21:30:53 1999 @@ -1,5 +1,5 @@ %{ -/* $Revision: 1.9 $ +/* $Revision: 1.10 $ ** ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -41,10 +41,8 @@ #include <alloca.h> #endif -#ifndef HAVE_TM_ZONE -#ifndef _TIMEZONE +#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE) extern time_t timezone; -#endif #endif #define yylhs date_yylhs

« previous php.dev (#14179) next »