[Python-checkins] python/dist/src configure, 1.416.4.2, 1.416.4.3 configure.in, 1.427.4.2, 1.427.4.3 pyconfig.h.in, 1.83, 1.83.4.1

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Thu Sep 18 21:00:21 EDT 2003


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8336

Modified Files:
      Tag: release23-maint
	configure configure.in pyconfig.h.in 
Log Message:
Improve detection of broken implementations of tzset().


Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.416.4.2
retrieving revision 1.416.4.3
diff -C2 -d -r1.416.4.2 -r1.416.4.3
*** configure	4 Sep 2003 18:52:06 -0000	1.416.4.2
--- configure	19 Sep 2003 01:00:10 -0000	1.416.4.3
***************
*** 1,4 ****
  #! /bin/sh
! # From configure.in Revision: 1.427.4.1 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.57 for python 2.3.
--- 1,4 ----
  #! /bin/sh
! # From configure.in Revision: 1.427.4.2 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.57 for python 2.3.
***************
*** 18243,18260 ****
  #include <stdlib.h>
  #include <time.h>
  int main()
  {
! 	int gmt_hour;
! 	int eastern_hour;
! 	time_t now;
! 	now = time((time_t*)NULL);
  	putenv("TZ=UTC+0");
  	tzset();
! 	gmt_hour = localtime(&now)->tm_hour;
  	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
  	tzset();
! 	eastern_hour = localtime(&now)->tm_hour;
! 	if (eastern_hour == gmt_hour)
  	    exit(1);
  	exit(0);
  }
--- 18243,18279 ----
  #include <stdlib.h>
  #include <time.h>
+ #include <string.h>
  int main()
  {
! 	/* Note that we need to ensure that not only does tzset(3)
! 	   do 'something' with localtime, but it works as documented
! 	   in the library reference and as expected by the test suite.
! 
! 	   Linux 6.2 doesn't understand the southern hemisphere
! 	   after New Year's Day.
! 	*/
! 
! 	time_t groundhogday = 1044144000; /* GMT-based, well, it's a colony */
! 	time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
! 
  	putenv("TZ=UTC+0");
  	tzset();
! 	if (localtime(&groundhogday)->tm_hour != 0)
! 	    exit(1);
! 
  	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
  	tzset();
! 	if (localtime(&groundhogday)->tm_hour != 19)
  	    exit(1);
+ 
+ 	putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
+ 	tzset();
+ 	if (localtime(&groundhogday)->tm_hour != 11)
+ 	    exit(1);
+ 	if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
+ 	    exit(1);
+ 	if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
+ 	    exit(1);
+ 
  	exit(0);
  }

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.427.4.2
retrieving revision 1.427.4.3
diff -C2 -d -r1.427.4.2 -r1.427.4.3
*** configure.in	4 Sep 2003 18:52:07 -0000	1.427.4.2
--- configure.in	19 Sep 2003 01:00:16 -0000	1.427.4.3
***************
*** 2799,2816 ****
  #include <stdlib.h>
  #include <time.h>
  int main()
  {
! 	int gmt_hour;
! 	int eastern_hour;
! 	time_t now;
! 	now = time((time_t*)NULL);
  	putenv("TZ=UTC+0");
  	tzset();
! 	gmt_hour = localtime(&now)->tm_hour;
  	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
  	tzset();
! 	eastern_hour = localtime(&now)->tm_hour;
! 	if (eastern_hour == gmt_hour)
  	    exit(1);
  	exit(0);
  }
--- 2799,2835 ----
  #include <stdlib.h>
  #include <time.h>
+ #include <string.h>
  int main()
  {
! 	/* Note that we need to ensure that not only does tzset(3)
! 	   do 'something' with localtime, but it works as documented
! 	   in the library reference and as expected by the test suite.
! 
! 	   Linux 6.2 doesn't understand the southern hemisphere 
! 	   after New Year's Day.
! 	*/
! 
! 	time_t groundhogday = 1044144000; /* GMT-based, well, it's a colony */
! 	time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
! 
  	putenv("TZ=UTC+0");
  	tzset();
! 	if (localtime(&groundhogday)->tm_hour != 0)
! 	    exit(1);
! 
  	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
  	tzset();
! 	if (localtime(&groundhogday)->tm_hour != 19)
! 	    exit(1);
! 
! 	putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
! 	tzset();
! 	if (localtime(&groundhogday)->tm_hour != 11)
! 	    exit(1);
! 	if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
! 	    exit(1);
! 	if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
  	    exit(1);
+ 
  	exit(0);
  }

Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.83
retrieving revision 1.83.4.1
diff -C2 -d -r1.83 -r1.83.4.1
*** pyconfig.h.in	22 Jul 2003 15:20:49 -0000	1.83
--- pyconfig.h.in	19 Sep 2003 01:00:16 -0000	1.83.4.1
***************
*** 601,604 ****
--- 601,607 ----
  #undef HAVE_TZNAME
  
+ /* Define this if you have tcl and TCL_UTF_MAX==6 */
+ #undef HAVE_UCS4_TCL
+ 
  /* Define this if you have the type uintptr_t. */
  #undef HAVE_UINTPTR_T





More information about the Python-checkins mailing list