[Python-checkins] python/dist/src configure, 1.420, 1.421 configure.in, 1.431, 1.432 pyconfig.h.in, 1.83, 1.84

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Thu Sep 18 20:59:18 EDT 2003


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8059
Modified Files:
	configure configure.in pyconfig.h.in 
Log Message:
Improve detection of whether tzset is broken.
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.420
retrieving revision 1.421
diff -C2 -d -r1.420 -r1.421
*** configure	4 Sep 2003 18:50:52 -0000	1.420
--- configure	19 Sep 2003 00:59:14 -0000	1.421
***************
*** 1,4 ****
 #! /bin/sh
! # From configure.in Revision: 1.430 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57 for python 2.4.
--- 1,4 ----
 #! /bin/sh
! # From configure.in Revision: 1.431 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57 for python 2.4.
***************
*** 18255,18272 ****
 #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);
 }
--- 18255,18291 ----
 #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.
! 
! 	 Red Hat 6.2 doesn't understand the southern hemisphere
! 	 after New Year's Day; it thinks swaps on that 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.431
retrieving revision 1.432
diff -C2 -d -r1.431 -r1.432
*** configure.in	4 Sep 2003 18:50:54 -0000	1.431
--- configure.in	19 Sep 2003 00:59:16 -0000	1.432
***************
*** 2811,2828 ****
 #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);
 }
--- 2811,2847 ----
 #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.
! 
! 	 Red Hat 6.2 doesn't understand the southern hemisphere 
! 	 after New Year's Day; it thinks swaps on that 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.84
diff -C2 -d -r1.83 -r1.84
*** pyconfig.h.in	22 Jul 2003 15:20:49 -0000	1.83
--- pyconfig.h.in	19 Sep 2003 00:59:16 -0000	1.84
***************
*** 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

AltStyle によって変換されたページ (->オリジナル) /