Change 30239 by [EMAIL PROTECTED] on 2007/02/12 20:04:15
Integrate:
[ 25084]
a long /etc/groups entry could cause memory exhaustion.
Too small a buffer would cause ERANGE and a retry with double the
buffer size. later at EOF, the apparent error got 'stuck' as
ERANGE rather than ENOENT, so the buffer size doubled recursively
[ 28749]
Part of one of Jarkko's g++ patches that was missed.
[ 28750]
The previous change causes compile failures with threaded Perls.
[ 28877]
Subject: [PATCH] deal with some gcc warnings
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Thu, 21 Sep 2006 09:08:47 +0300
Message-ID: <[EMAIL PROTECTED]>
[ 29209]
RE: [perl #26136] localtime(3) calls tzset(3), but localtime_r(3) may
not.
From: "Benjamin Holzman" <[EMAIL PROTECTED]>
Date: Wed, 19 Jul 2006 07:11:09 -0400
Message-ID: <[EMAIL PROTECTED]>
[ 29210]
Change reentr.pl to generate reentr.h accordingly to change 29209
[ 29213]
The non-unix parts for localtime_r_needs_tzset
Plus forced Glossary entry. That is a TODO for automation
[ 29704]
Add 2007 copyrights in a few more .pl files that
generate code (thanks to Jarkko)
Affected files ...
... //depot/maint-5.8/perl/Configure#84 integrate
... //depot/maint-5.8/perl/Cross/config.sh-arm-linux#21 integrate
... //depot/maint-5.8/perl/NetWare/config.wc#13 integrate
... //depot/maint-5.8/perl/Porting/Glossary#26 integrate
... //depot/maint-5.8/perl/Porting/config_H#19 integrate
... //depot/maint-5.8/perl/config_h.SH#44 integrate
... //depot/maint-5.8/perl/configure.com#52 integrate
... //depot/maint-5.8/perl/epoc/config.sh#15 integrate
... //depot/maint-5.8/perl/handy.h#47 integrate
... //depot/maint-5.8/perl/overload.pl#2 integrate
... //depot/maint-5.8/perl/plan9/config.plan9#20 integrate
... //depot/maint-5.8/perl/plan9/config_h.sample#12 integrate
... //depot/maint-5.8/perl/plan9/config_sh.sample#11 integrate
... //depot/maint-5.8/perl/reentr.c#23 edit
... //depot/maint-5.8/perl/reentr.h#21 integrate
... //depot/maint-5.8/perl/reentr.inc#14 edit
... //depot/maint-5.8/perl/reentr.pl#32 integrate
... //depot/maint-5.8/perl/t/op/time.t#5 integrate
... //depot/maint-5.8/perl/uconfig.sh#18 integrate
... //depot/maint-5.8/perl/win32/config.bc#25 integrate
... //depot/maint-5.8/perl/win32/config.gc#26 integrate
... //depot/maint-5.8/perl/win32/config.vc#27 integrate
... //depot/maint-5.8/perl/win32/config.vc64#27 integrate
... //depot/maint-5.8/perl/win32/config_H.bc#35 integrate
... //depot/maint-5.8/perl/win32/config_H.gc#35 integrate
... //depot/maint-5.8/perl/win32/config_H.vc#35 integrate
... //depot/maint-5.8/perl/win32/config_H.vc64#35 integrate
Differences ...
==== //depot/maint-5.8/perl/Configure#84 (xtext) ====
Index: perl/Configure
--- perl/Configure#83~30107~ 2007-02-03 10:08:37.000000000 -0800
+++ perl/Configure 2007-02-12 12:04:15.000000000 -0800
@@ -26,7 +26,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Aug 2 13:20:07 CEST 2006 [metaconfig 3.0 PL70]
+# Generated on Mon Nov 6 10:30:43 CET 2006 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by [EMAIL PROTECTED])
cat >c1$$ <<EOF
@@ -548,6 +548,7 @@
d_libm_lib_version=''
d_link=''
d_localtime_r=''
+d_localtime_r_needs_tzset=''
localtime_r_proto=''
d_locconv=''
d_lockf=''
@@ -14518,6 +14519,59 @@
;;
esac
+: see if localtime_r calls tzset
+case "$localtime_r_proto" in
+REENTRANT_PROTO*)
+ $cat >try.c <<EOCP
+/* Does our libc's localtime_r call tzset ?
+ * return 0 if so, 1 otherwise.
+ */
+#include <sys/types.h>
+#include <unistd.h>
+#include <time.h>
+#include <string.h>
+#include <malloc.h>
+int main()
+{
+ time_t t = time(0L);
+ char w_tz[]="TZ" "=GMT+5",
+ e_tz[]="TZ" "=GMT-5",
+ *tz_e = (char*)malloc(16),
+ *tz_w = (char*)malloc(16);
+ struct tm tm_e, tm_w;
+ memset(&tm_e,'\0',sizeof(struct tm));
+ memset(&tm_w,'\0',sizeof(struct tm));
+ strcpy(tz_e,e_tz);
+ strcpy(tz_w,w_tz);
+
+ putenv(tz_e);
+ localtime_r(&t, &tm_e);
+
+ putenv(tz_w);
+ localtime_r(&t, &tm_w);
+
+ if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 )
+ return 1;
+ return 0;
+}
+EOCP
+ set try
+ if eval $compile; then
+ if ./try; then
+ d_localtime_r_needs_tzset=undef;
+ else
+ d_localtime_r_needs_tzset=define;
+ fi;
+ else
+ d_localtime_r_needs_tzset=undef;
+ fi;
+ ;;
+ *)
+ d_localtime_r_needs_tzset=undef;
+ ;;
+esac
+$rm -f try try.* core
+
: see if localeconv exists
set localeconv d_locconv
eval $inlibc
@@ -21508,6 +21562,7 @@
d_libm_lib_version='$d_libm_lib_version'
d_link='$d_link'
d_localtime_r='$d_localtime_r'
+d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
d_locconv='$d_locconv'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
==== //depot/maint-5.8/perl/Cross/config.sh-arm-linux#21 (text) ====
Index: perl/Cross/config.sh-arm-linux
--- perl/Cross/config.sh-arm-linux#20~28443~ 2006-06-27 15:39:26.000000000
-0700
+++ perl/Cross/config.sh-arm-linux 2007-02-12 12:04:15.000000000 -0800
@@ -277,6 +277,7 @@
d_ldbl_dig='define'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='define'
d_longdbl='define'
==== //depot/maint-5.8/perl/NetWare/config.wc#13 (text) ====
Index: perl/NetWare/config.wc
--- perl/NetWare/config.wc#12~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/NetWare/config.wc 2007-02-12 12:04:15.000000000 -0800
@@ -269,6 +269,7 @@
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/Porting/Glossary#26 (text) ====
Index: perl/Porting/Glossary
--- perl/Porting/Glossary#25~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/Porting/Glossary 2007-02-12 12:04:15.000000000 -0800
@@ -1226,6 +1226,10 @@
which indicates to the C program that the localtime_r()
routine is available.
+d_localtime_r_needs_tzset (d_localtime_r.U):
+ This variable conditionally defines the LOCALTIME_R_NEEDS_TZSET
+ symbol, which makes us call tzset before localtime_r()
+
d_locconv (d_locconv.U):
This variable conditionally defines HAS_LOCALECONV if localeconv() is
available for numeric and monetary formatting conventions.
==== //depot/maint-5.8/perl/Porting/config_H#19 (text) ====
Index: perl/Porting/config_H
--- perl/Porting/config_H#18~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/Porting/config_H 2007-02-12 12:04:15.000000000 -0800
@@ -4131,6 +4131,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -4138,6 +4144,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R / **/
+/*#define LOCALTIME_R_NEEDS_TZSET / **/
#define LOCALTIME_R_PROTO 0 /**/
/* OLD_PTHREAD_CREATE_JOINABLE:
==== //depot/maint-5.8/perl/config_h.SH#44 (text) ====
Index: perl/config_h.SH
--- perl/config_h.SH#43~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/config_h.SH 2007-02-12 12:04:15.000000000 -0800
@@ -2282,6 +2282,19 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
+#$d_localtime_r_needs_tzset LOCALTIME_R_NEEDS_TZSET /**/
+#ifdef LOCALTIME_R_NEEDS_TZSET
+#define L_R_TZSET tzset(),
+#else
+#define L_R_TZSET
+#endif
+
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
==== //depot/maint-5.8/perl/configure.com#52 (text) ====
Index: perl/configure.com
--- perl/configure.com#51~30164~ 2007-02-07 13:38:12.000000000 -0800
+++ perl/configure.com 2007-02-12 12:04:15.000000000 -0800
@@ -6486,6 +6486,7 @@
$ WC "d_getspnam_r='undef'"
$ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
$ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
+$ WC "d_localtime_r_needs_tzset='undef'"
$ WC "d_random_r='undef'"
$ WC "d_readdir_r='define'" ! always defined; we roll our own
$ WC "d_readdir64_r='undef'"
==== //depot/maint-5.8/perl/epoc/config.sh#15 (text) ====
Index: perl/epoc/config.sh
--- perl/epoc/config.sh#14~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/epoc/config.sh 2007-02-12 12:04:15.000000000 -0800
@@ -270,6 +270,7 @@
d_link='undef'
d_llseek='undef'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='undef'
d_lockf='undef'
d_longdbl='undef'
==== //depot/maint-5.8/perl/handy.h#47 (text) ====
Index: perl/handy.h
--- perl/handy.h#46~30023~ 2007-01-26 13:52:35.000000000 -0800
+++ perl/handy.h 2007-02-12 12:04:15.000000000 -0800
@@ -175,7 +175,7 @@
#endif
/* HMB H.Merijn Brand - a placeholder for preparing Configure patches */
-#if defined(HAS_MALLOC_SIZE) && defined(HAS_MALLOC_GOOD_SIZE) &&
defined(HAS_CLEARENV)
+#if defined(HAS_MALLOC_SIZE) && defined(LOCALTIME_R_NEEDS_TZSET)
/* Not (yet) used at top level, but mention them for metaconfig */
#endif
==== //depot/maint-5.8/perl/overload.pl#2 (text) ====
Index: perl/overload.pl
--- perl/overload.pl#1~30057~ 2007-01-29 07:55:07.000000000 -0800
+++ perl/overload.pl 2007-02-12 12:04:15.000000000 -0800
@@ -32,8 +32,8 @@
*
* overload.h
*
- * Copyright (C) 1997, 1998, 2000, 2001, 2005 and 2006 by Larry Wall and
- * others
+ * Copyright (C) 1997, 1998, 2000, 2001, 2005, 2006, 2007 by Larry Wall
+ * and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
==== //depot/maint-5.8/perl/plan9/config.plan9#20 (text) ====
Index: perl/plan9/config.plan9
--- perl/plan9/config.plan9#19~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/plan9/config.plan9 2007-02-12 12:04:15.000000000 -0800
@@ -1961,6 +1961,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1968,6 +1974,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R / **/
+/*#define LOCALTIME_R_NEEDS_TZSET / **/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
==== //depot/maint-5.8/perl/plan9/config_h.sample#12 (text) ====
Index: perl/plan9/config_h.sample
--- perl/plan9/config_h.sample#11~30033~ 2007-01-27 08:40:35.000000000
-0800
+++ perl/plan9/config_h.sample 2007-02-12 12:04:15.000000000 -0800
@@ -1908,6 +1908,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1915,6 +1921,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R / **/
+/*#define LOCALTIME_R_NEEDS_TZSET / **/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
==== //depot/maint-5.8/perl/plan9/config_sh.sample#11 (text) ====
Index: perl/plan9/config_sh.sample
--- perl/plan9/config_sh.sample#10~28443~ 2006-06-27 15:39:26.000000000
-0700
+++ perl/plan9/config_sh.sample 2007-02-12 12:04:15.000000000 -0800
@@ -277,6 +277,7 @@
d_ldbl_dig='define'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/reentr.c#23 (text) ====
Index: perl/reentr.c
--- perl/reentr.c#22~30106~ 2007-02-03 09:15:45.000000000 -0800
+++ perl/reentr.c 2007-02-12 12:04:15.000000000 -0800
@@ -2,7 +2,7 @@
*
* reentr.c
*
- * Copyright (C) 2002, 2003, 2005, 2006 by Larry Wall and others
+ * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
==== //depot/maint-5.8/perl/reentr.h#21 (text) ====
Index: perl/reentr.h
--- perl/reentr.h#20~30238~ 2007-02-12 11:38:26.000000000 -0800
+++ perl/reentr.h 2007-02-12 12:04:15.000000000 -0800
@@ -2,7 +2,7 @@
*
* reentr.h
*
- * Copyright (C) 2002, 2003, 2005, 2006 by Larry Wall and others
+ * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
==== //depot/maint-5.8/perl/reentr.inc#14 (text+w) ====
Index: perl/reentr.inc
--- perl/reentr.inc#13~30238~ 2007-02-12 11:38:26.000000000 -0800
+++ perl/reentr.inc 2007-02-12 12:04:15.000000000 -0800
@@ -1433,10 +1433,10 @@
# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
# undef localtime
# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS
-# define localtime(a) (localtime_r(a,
&PL_reentrant_buffer->_localtime_struct) ?
&PL_reentrant_buffer->_localtime_struct : 0)
+# define localtime(a) (L_R_TZSET localtime_r(a,
&PL_reentrant_buffer->_localtime_struct) ?
&PL_reentrant_buffer->_localtime_struct : 0)
# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
# if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS
-# define localtime(a) (localtime_r(a,
&PL_reentrant_buffer->_localtime_struct) == 0 ?
&PL_reentrant_buffer->_localtime_struct : 0)
+# define localtime(a) (L_R_TZSET localtime_r(a,
&PL_reentrant_buffer->_localtime_struct) == 0 ?
&PL_reentrant_buffer->_localtime_struct : 0)
# endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
# endif /* HAS_LOCALTIME */
#endif /* HAS_LOCALTIME_R */
==== //depot/maint-5.8/perl/reentr.pl#32 (text) ====
Index: perl/reentr.pl
--- perl/reentr.pl#31~30238~ 2007-02-12 11:38:26.000000000 -0800
+++ perl/reentr.pl 2007-02-12 12:04:15.000000000 -0800
@@ -49,7 +49,7 @@
*
* reentr.h
*
- * Copyright (C) 2002, 2003, 2005, 2006 by Larry Wall and others
+ * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -711,6 +711,9 @@
}
my $call = "${func}_r($v$w)";
+ if ($func eq 'localtime') {
+ $call = "L_R_TZSET $call";
+ }
# Must make OpenBSD happy
my $memzero = '';
@@ -888,7 +891,7 @@
*
* reentr.c
*
- * Copyright (C) 2002, 2003, 2005, 2006 by Larry Wall and others
+ * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
==== //depot/maint-5.8/perl/t/op/time.t#5 (xtext) ====
Index: perl/t/op/time.t
--- perl/t/op/time.t#4~29733~ 2007-01-09 03:12:58.000000000 -0800
+++ perl/t/op/time.t 2007-02-12 12:04:15.000000000 -0800
@@ -1,10 +1,10 @@
#!./perl
if ( $does_gmtime = gmtime(time) ) {
- print "1..7\n"
+ print "1..8\n"
}
else {
- print "1..4\n"
+ print "1..5\n"
}
@@ -52,6 +52,13 @@
'localtime(), scalar context'
);
+# check that localtime respects changes to $ENV{TZ}
+$ENV{TZ} = "GMT-5";
+($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg);
+$ENV{TZ} = "GMT+5";
+($sec,$min,$hour2,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg);
+ok($hour != $hour2, 'changes to $ENV{TZ}
respected');
+
exit 0 unless $does_gmtime;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg);
==== //depot/maint-5.8/perl/uconfig.sh#18 (xtext) ====
Index: perl/uconfig.sh
--- perl/uconfig.sh#17~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/uconfig.sh 2007-02-12 12:04:15.000000000 -0800
@@ -212,6 +212,7 @@
d_libm_lib_version='undef'
d_link='undef'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='undef'
d_lockf='undef'
d_longdbl='undef'
==== //depot/maint-5.8/perl/win32/config.bc#25 (text) ====
Index: perl/win32/config.bc
--- perl/win32/config.bc#24~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config.bc 2007-02-12 12:04:15.000000000 -0800
@@ -270,6 +270,7 @@
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/win32/config.gc#26 (text) ====
Index: perl/win32/config.gc
--- perl/win32/config.gc#25~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config.gc 2007-02-12 12:04:15.000000000 -0800
@@ -270,6 +270,7 @@
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/win32/config.vc#27 (text) ====
Index: perl/win32/config.vc
--- perl/win32/config.vc#26~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config.vc 2007-02-12 12:04:15.000000000 -0800
@@ -270,6 +270,7 @@
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/win32/config.vc64#27 (text) ====
Index: perl/win32/config.vc64
--- perl/win32/config.vc64#26~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config.vc64 2007-02-12 12:04:15.000000000 -0800
@@ -270,6 +270,7 @@
d_libm_lib_version='undef'
d_link='define'
d_localtime_r='undef'
+d_localtime_r_needs_tzset='undef'
d_locconv='define'
d_lockf='undef'
d_longdbl='define'
==== //depot/maint-5.8/perl/win32/config_H.bc#35 (text+w) ====
Index: perl/win32/config_H.bc
--- perl/win32/config_H.bc#34~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config_H.bc 2007-02-12 12:04:15.000000000 -0800
@@ -1880,6 +1880,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1887,6 +1893,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R /**/
+/*#define LOCALTIME_R_NEEDS_TZSET /**/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
==== //depot/maint-5.8/perl/win32/config_H.gc#35 (text+w) ====
Index: perl/win32/config_H.gc
--- perl/win32/config_H.gc#34~30140~ 2007-02-05 14:01:07.000000000 -0800
+++ perl/win32/config_H.gc 2007-02-12 12:04:15.000000000 -0800
@@ -1888,6 +1888,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1895,6 +1901,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R /**/
+/*#define LOCALTIME_R_NEEDS_TZSET /**/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
==== //depot/maint-5.8/perl/win32/config_H.vc#35 (text+w) ====
Index: perl/win32/config_H.vc
--- perl/win32/config_H.vc#34~30140~ 2007-02-05 14:01:07.000000000 -0800
+++ perl/win32/config_H.vc 2007-02-12 12:04:15.000000000 -0800
@@ -1889,6 +1889,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1896,6 +1902,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R /**/
+/*#define LOCALTIME_R_NEEDS_TZSET /**/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
==== //depot/maint-5.8/perl/win32/config_H.vc64#35 (text) ====
Index: perl/win32/config_H.vc64
--- perl/win32/config_H.vc64#34~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config_H.vc64 2007-02-12 12:04:15.000000000 -0800
@@ -1880,6 +1880,12 @@
* This symbol, if defined, indicates that the localtime_r routine
* is available to localtime re-entrantly.
*/
+/* LOCALTIME_R_NEEDS_TZSET:
+ * Many libc's localtime_r implementations do not call tzset,
+ * making them differ from localtime(), and making timezone
+ * changes using $ENV{TZ} without explicitly calling tzset
+ * impossible. This symbol makes us call tzset before localtime_r
+ */
/* LOCALTIME_R_PROTO:
* This symbol encodes the prototype of localtime_r.
* It is zero if d_localtime_r is undef, and one of the
@@ -1887,6 +1893,7 @@
* is defined.
*/
/*#define HAS_LOCALTIME_R /**/
+/*#define LOCALTIME_R_NEEDS_TZSET /**/
#define LOCALTIME_R_PROTO 0 /**/
/* HAS_LONG_DOUBLE:
End of Patch.