summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-04-11 12:45:38 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-04-11 12:45:38 +0000
commitb0eaca4212adbb440bab783f5f9ebfed7798db80 (patch)
tree0f73d43014b419947f84181e4a94fdf2f20ead76
parent8f50aae34899188b08cfed79bb519d353510c702 (diff)
Merge changes between r5854 and r5879 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@5880 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--libc/ChangeLog70
-rw-r--r--libc/stdlib/tst-makecontext.c3
-rw-r--r--libc/sysdeps/powerpc/fpu/Makefile1
-rw-r--r--libc/sysdeps/powerpc/fpu/test-powerpc-snan.c385
-rw-r--r--libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.S56
-rw-r--r--libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.c7
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/hp-timing.c25
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/hp-timing.h152
-rw-r--r--libc/sysdeps/powerpc/powerpc64/dl-machine.h65
-rw-r--r--libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.S57
-rw-r--r--libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.c7
-rw-r--r--libc/sysdeps/powerpc/powerpc64/hp-timing.h6
-rw-r--r--libc/time/alt_digit.c16
-rw-r--r--libc/time/era.c8
-rw-r--r--libc/timezone/asia104
-rw-r--r--libc/timezone/backward5
-rw-r--r--libc/timezone/europe3
-rw-r--r--libc/timezone/iso3166.tab6
-rw-r--r--libc/timezone/leapseconds19
-rw-r--r--libc/timezone/northamerica75
-rw-r--r--libc/timezone/private.h96
-rw-r--r--libc/timezone/southamerica178
-rw-r--r--libc/timezone/zdump.c35
-rw-r--r--libc/timezone/zic.c149
-rw-r--r--libc/timezone/zone.tab14
-rw-r--r--libc/version.h4
-rw-r--r--libc/wcsmbs/wcsmbsload.c8
27 files changed, 1248 insertions, 306 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index 21312f6d1..49c916a83 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,66 @@
+2008-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #5443]
+ * time/era.c: Transform __libc_setlocale_lock into rwlock.
+ * time/alt_digit.c: Likewise.
+ * wcsmbs/wcsmbsload.c: Likewise.
+
+2008-04-10 Ulrich Drepper <drepper@redhat.com>
+
+ * version.h (VERSION): Bump to 2.8.
+
+ * timzeone/asia: Update from tzdata2008b.
+ * timezone/backward: Likewise.
+ * timezone/europe: Likewise.
+ * timezone/northamerica: Likewise.
+ * timezone/southamerica: Likewise.
+ * timezone/iso3166.tab: Likewise.
+ * timezone/leapseconds: Likewise.
+ * timezone/zone.tab: Likewise.
+ * timezone/private.h: Update from tzcode2008a.
+ * timezone/zdump.c: Likewise.
+ * timezone/zic.c: Likewise.
+
+2008-01-24 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #5741]
+ * sysdeps/powerpc/powerpc64/dl-machine.h (PPC_DCBT, PPC_DCBF):
+ Define additonal Data Cache Block instruction macros.
+ (elf_machine_fixup_plt): Add dcbt for opd and plt entries.
+ Replace dcbst with dcbf and sync with sync/isync.
+
+2008-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class):
+ Always set ELF_RTYPE_CLASS_PLT.
+ (elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p): Delete.
+
+2008-04-03 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/powerpc/powerpc32/power4/hp-timing.c: New file.
+ * sysdeps/powerpc/powerpc32/power4/hp-timing.h: New file.
+ * sysdeps/powerpc/powerpc64/hp-timing.h [_ARCH_PWR4] (HP_TIMING_NOW):
+ For ISA 2.01 and later replace mftb with mfspr 268.
+
+2008-02-19 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #5768]
+ * sysdeps/powerpc/fpu/Makefile (libm-tests): Add test-powerpc-snan.
+ * sysdeps/powerpc/fpu/test-powerpc-snan.c: New file.
+
+2008-02-18 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #5768]
+ * sysdeps/powerpc/powerpc32/fpu/s_isnan.S: New file.
+ * sysdeps/powerpc/powerpc32/fpu/s_isnan.c: Removed.
+ * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: New file.
+ * sysdeps/powerpc/powerpc64/fpu/s_isnan.c: Removed.
+
+2008-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ * stdlib/tst-makecontext.c (othervar): New variable.
+ (cf): Test sign extending the argument to long.
+
2008-03-03 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S: New file.
@@ -32,11 +95,12 @@
2008-04-09 Ulrich Drepper <drepper@redhat.com>
[BZ #4314]
- * sysdeps/i386/i686/memcpy.S: Optimize copying of aligned buffers.
+ * sysdeps/i386/i686/memcpy.S: Optimize copying of equally aligned
+ buffers.
[BZ #5209]
- * sysdeps/unix/sysv/syscalls.list: The times syscall doesn't return
- an error value.
+ * sysdeps/unix/sysv/syscalls.list: The times syscall doesn't have
+ a reserved error value.
* stdlib/tst-makecontext.c: Change parameter to cf to negative
value to check for correct sign extension.
diff --git a/libc/stdlib/tst-makecontext.c b/libc/stdlib/tst-makecontext.c
index 5fe66f6fc..00f8f1990 100644
--- a/libc/stdlib/tst-makecontext.c
+++ b/libc/stdlib/tst-makecontext.c
@@ -26,11 +26,12 @@ char st1[8192];
__thread int thr;
int somevar = -76;
+long othervar = -78L;
void
cf (int i)
{
- if (i != -78 || thr != 94)
+ if (i != othervar || thr != 94)
{
printf ("i %d thr %d\n", i, thr);
exit (1);
diff --git a/libc/sysdeps/powerpc/fpu/Makefile b/libc/sysdeps/powerpc/fpu/Makefile
index 060c952d1..ce67ff87d 100644
--- a/libc/sysdeps/powerpc/fpu/Makefile
+++ b/libc/sysdeps/powerpc/fpu/Makefile
@@ -1,5 +1,6 @@
ifeq ($(subdir),math)
libm-support += fenv_const fe_nomask fe_mask t_sqrt
+libm-tests += test-powerpc-snan
# libm needs ld.so to access dl_hwcap
$(objpfx)libm.so: $(elfobjdir)/ld.so
diff --git a/libc/sysdeps/powerpc/fpu/test-powerpc-snan.c b/libc/sysdeps/powerpc/fpu/test-powerpc-snan.c
new file mode 100644
index 000000000..93b212abc
--- /dev/null
+++ b/libc/sysdeps/powerpc/fpu/test-powerpc-snan.c
@@ -0,0 +1,385 @@
+/* Test Signalling NaN in isnan, isinf etc functions.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2005.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define _GNU_SOURCE
+#define __USE_GNU
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <string.h>
+#include <math.h>
+#include <float.h>
+#include <fenv.h>
+#include <signal.h>
+#include <setjmp.h>
+#include <errno.h>
+
+int dest_offset;
+char *dest_address;
+double value = 123.456;
+double zero = 0.0;
+
+float SNANf;
+double SNAN;
+long double SNANl;
+
+static sigjmp_buf sigfpe_buf;
+
+void
+init_signaling_nan()
+{
+ union {
+ double _ld16;
+ double _d8;
+ unsigned int _ui4[4];
+ float _f4;
+ } nan_temp;
+
+ nan_temp._ui4[0] = 0x7fa00000;
+ SNANf = nan_temp._f4;
+
+ nan_temp._ui4[0] = 0x7ff40000;
+ nan_temp._ui4[1] = 0x00000000;
+ SNAN = nan_temp._d8;
+
+ nan_temp._ui4[0] = 0x7ff40000;
+ nan_temp._ui4[1] = 0x00000000;
+ nan_temp._ui4[2] = 0x00000000;
+ nan_temp._ui4[3] = 0x00000000;
+ SNANl = nan_temp._ld16;
+}
+
+static float
+snan_float (void)
+{
+ return SNANf;
+}
+
+static double
+snan_double (void)
+{
+ return SNAN;
+}
+
+typedef long double ldouble;
+
+static ldouble
+snan_ldouble (void)
+{
+ return SNANl;
+}
+
+
+void
+myFPsighandler(int signal,
+ siginfo_t *info,
+ void *context)
+{
+ siglongjmp(sigfpe_buf, 0);
+}
+
+int
+set_sigaction_FP(void)
+{
+ struct sigaction sa;
+ /* register RT signal handler via sigaction */
+ sa.sa_flags = SA_SIGINFO;
+ sa.sa_sigaction = &myFPsighandler;
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGFPE, &sa, NULL);
+
+ return 0;
+}
+
+int
+remove_sigaction_FP(void)
+{
+ struct sigaction sa;
+ /* restore default RT signal handler via sigaction */
+ sa.sa_flags = SA_SIGINFO;
+ sa.sa_handler = SIG_DFL;
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGFPE, &sa, NULL);
+
+ return 0;
+}
+
+static int errors = 0;
+
+static void
+check (const char *testname, int result)
+{
+ if (!result) {
+ printf ("Failure: %s\n", testname);
+ errors++;
+ }
+}
+
+#define TEST_FUNC(NAME, FLOAT) \
+static void \
+NAME (void) \
+{ \
+ /* Variables are declared volatile to forbid some compiler \
+ optimizations. */ \
+ volatile FLOAT Inf_var, NaN_var, zero_var, one_var, SNaN_var; \
+ fenv_t saved_fenv; \
+ \
+ zero_var = 0.0; \
+ one_var = 1.0; \
+ NaN_var = zero_var / zero_var; \
+ SNaN_var = snan_##FLOAT (); \
+ Inf_var = one_var / zero_var; \
+ \
+ (void) &zero_var; \
+ (void) &one_var; \
+ (void) &NaN_var; \
+ (void) &SNaN_var; \
+ (void) &Inf_var; \
+ \
+ set_sigaction_FP (); \
+ fegetenv(&saved_fenv); \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnan(NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnan (NaN)", isnan (NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnan(-NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnan (-NaN)", isnan (-NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnan(SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnan (SNaN)", isnan (SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnan(-SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnan (-SNaN)", isnan (-SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isinf(NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isinf (NaN)", !isinf (NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isinf(-NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isinf (-NaN)", !isinf (-NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isinf(SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isinf (SNaN)", !isinf (SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isinf(-SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isinf (-SNaN)", !isinf (-SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isfinite(NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isfinite (NaN)", !isfinite (NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isfinite(-NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isfinite (-NaN)", !isfinite (-NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isfinite(SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isfinite (SNaN)", !isfinite (SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isfinite(-SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isfinite (-SNaN)", !isfinite (-SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnormal(NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnormal (NaN)", !isnormal (NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnormal(-NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnormal (-NaN)", !isnormal (-NaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnormal(SNaN) isnormal SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnormal (SNaN)", !isnormal (SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " isnormal(-SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " isnormal (-SNaN)", !isnormal (-SNaN_var)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " fpclassify(NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " fpclassify (NaN)", (fpclassify (NaN_var)==FP_NAN)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " fpclassify(-NaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " fpclassify (-NaN)", (fpclassify (-NaN_var)==FP_NAN)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " fpclassify(SNaN) isnormal SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " fpclassify (SNaN)", (fpclassify (SNaN_var)==FP_NAN)); \
+ } \
+ \
+ feclearexcept(FE_ALL_EXCEPT); \
+ feenableexcept (FE_ALL_EXCEPT); \
+ if (sigsetjmp(sigfpe_buf, 0)) \
+ { \
+ printf (#FLOAT " fpclassify(-SNaN) raised SIGFPE\n"); \
+ errors++; \
+ } else { \
+ check (#FLOAT " fpclassify (-SNaN)", (fpclassify (-SNaN_var)==FP_NAN)); \
+ } \
+ \
+ fesetenv(&saved_fenv); /* restore saved fenv */ \
+ remove_sigaction_FP(); \
+}
+
+TEST_FUNC (float_test, float)
+TEST_FUNC (double_test, double)
+#ifndef NO_LONG_DOUBLE
+TEST_FUNC (ldouble_test, ldouble)
+#endif
+
+static int
+do_test (void)
+{
+ init_signaling_nan();
+
+ float_test();
+ double_test();
+#ifndef NO_LONG_DOUBLE
+ ldouble_test();
+#endif
+
+ return errors != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
diff --git a/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.S b/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
new file mode 100644
index 000000000..6e3f396de
--- /dev/null
+++ b/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.S
@@ -0,0 +1,56 @@
+/* isnan(). PowerPC32 version.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isnan(x) */
+ .machine power4
+EALIGN (__isnan, 4, 0)
+ mffs fp0
+ mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */
+ fcmpu cr7,fp1,fp1
+ mtfsf 255,fp0
+ li r3,0
+ beqlr+ cr7 /* (x == x) then not a NAN */
+ li r3,1 /* else must be a NAN */
+ blr
+ END (__isnan)
+
+hidden_def (__isnan)
+weak_alias (__isnan, isnan)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isnan, __isnanf)
+hidden_def (__isnanf)
+weak_alias (__isnanf, isnanf)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isnan, __isnanl)
+weak_alias (__isnan, isnanl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif
+
diff --git a/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.c b/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.c
deleted file mode 100644
index 397717ba9..000000000
--- a/libc/sysdeps/powerpc/powerpc32/fpu/s_isnan.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sysdeps/powerpc/fpu/s_isnan.c>
-#ifndef IS_IN_libm
-# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
-compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
-compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
-# endif
-#endif
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.c b/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.c
new file mode 100644
index 000000000..332fe8af9
--- /dev/null
+++ b/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.c
@@ -0,0 +1,25 @@
+/* Support for high precision, low overhead timing functions.
+ powerpc64 version.
+ Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <hp-timing.h>
+
+/* We have to define the variable for the overhead. */
+hp_timing_t _dl_hp_timing_overhead;
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.h
new file mode 100644
index 000000000..5f719dd5a
--- /dev/null
+++ b/libc/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -0,0 +1,152 @@
+/* High precision, low overhead timing functions. powerpc64 version.
+ Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _HP_TIMING_H
+#define _HP_TIMING_H 1
+
+#include <string.h>
+#include <sys/param.h>
+#include <stdio-common/_itoa.h>
+#include <atomic.h>
+
+/* The macros defined here use the powerpc 64-bit time base register.
+ The time base is nominally clocked at 1/8th the CPU clock, but this
+ can vary.
+
+ The list of macros we need includes the following:
+
+ - HP_TIMING_AVAIL: test for availability.
+
+ - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
+ implemented using function calls but instead uses some inlined code
+ which might simply consist of a few assembler instructions. We have to
+ know this since we might want to use the macros here in places where we
+ cannot make function calls.
+
+ - hp_timing_t: This is the type for variables used to store the time
+ values.
+
+ - HP_TIMING_ZERO: clear `hp_timing_t' object.
+
+ - HP_TIMING_NOW: place timestamp for current time in variable given as
+ parameter.
+
+ - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
+ HP_TIMING_DIFF macro.
+
+ - HP_TIMING_DIFF: compute difference between two times and store it
+ in a third. Source and destination might overlap.
+
+ - HP_TIMING_ACCUM: add time difference to another variable. This might
+ be a bit more complicated to implement for some platforms as the
+ operation should be thread-safe and 64bit arithmetic on 32bit platforms
+ is not.
+
+ - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
+ there are no threads involved.
+
+ - HP_TIMING_PRINT: write decimal representation of the timing value into
+ the given string. This operation need not be inline even though
+ HP_TIMING_INLINE is specified.
+
+*/
+
+/* We always assume having the timestamp register. */
+#define HP_TIMING_AVAIL (1)
+
+/* We indeed have inlined functions. */
+#define HP_TIMING_INLINE (1)
+
+/* We use 64bit values for the times. */
+typedef unsigned long long int hp_timing_t;
+
+/* Set timestamp value to zero. */
+#define HP_TIMING_ZERO(Var) (Var) = (0)
+
+/* That's quite simple. Use the `mftb' instruction. Note that the value
+ might not be 100% accurate since there might be some more instructions
+ running in this moment. This could be changed by using a barrier like
+ 'lwsync' right before the `mftb' instruciton. But we are not interested
+ in accurate clock cycles here so we don't do this. */
+
+#define HP_TIMING_NOW(Var) \
+ do { \
+ union { long long ll; long ii[2]; } _var; \
+ long tmp; \
+ __asm__ __volatile__ ( \
+ "1: mfspr %0,269;" \
+ " mfspr %1,268;" \
+ " mfspr %2,269;" \
+ " cmpw %0,%2;" \
+ " bne 1b;" \
+ : "=r" (_var.ii[0]), "=r" (_var.ii[1]) , "=r" (tmp) \
+ : : "cr0" \
+ ); \
+ Var = _var.ll; \
+ } while (0)
+
+
+/* Use two 'mftb' instructions in a row to find out how long it takes.
+ On current POWER4, POWER5, and 970 processors mftb take ~10 cycles. */
+#define HP_TIMING_DIFF_INIT() \
+ do { \
+ if (GLRO(dl_hp_timing_overhead) == 0) \
+ { \
+ int __cnt = 5; \
+ GLRO(dl_hp_timing_overhead) = ~0ull; \
+ do \
+ { \
+ hp_timing_t __t1, __t2; \
+ HP_TIMING_NOW (__t1); \
+ HP_TIMING_NOW (__t2); \
+ if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \
+ GLRO(dl_hp_timing_overhead) = __t2 - __t1; \
+ } \
+ while (--__cnt > 0); \
+ } \
+ } while (0)
+
+/* It's simple arithmetic in 64-bit. */
+#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
+
+/* We need to insure that this add is atomic in threaded environments. We use
+ __arch_atomic_exchange_and_add_64 from atomic.h to get thread safety. */
+#define HP_TIMING_ACCUM(Sum, Diff) \
+ do { \
+ hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead); \
+ __arch_atomic_exchange_and_add_64 (&(Sum), __diff); \
+ } while (0)
+
+/* No threads, no extra work. */
+#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
+
+/* Print the time value. */
+#define HP_TIMING_PRINT(Buf, Len, Val) \
+ do { \
+ char __buf[20]; \
+ char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0); \
+ size_t __len = (Len); \
+ char *__dest = (Buf); \
+ while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \
+ *__dest++ = *__cp++; \
+ memcpy (__dest, " ticks", MIN (__len, sizeof (" ticks"))); \
+ } while (0)
+
+#endif /* hp-timing.h */
diff --git a/libc/sysdeps/powerpc/powerpc64/dl-machine.h b/libc/sysdeps/powerpc/powerpc64/dl-machine.h
index 89a69e1a2..b674dbef4 100644
--- a/libc/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/libc/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions.
PowerPC64 version.
- Copyright 1995-2005, 2006 Free Software Foundation, Inc.
+ Copyright 1995-2005, 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -246,30 +246,35 @@ BODY_PREFIX "_dl_start_user:\n" \
" " END_2(_dl_start_user) "\n" \
" .popsection");
-/* Nonzero iff TYPE should not be allowed to resolve to one of
- the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_PPC64_COPY)
+/* ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to
+ one of the main executable's symbols, as for a COPY reloc.
+
+ To make function pointer comparisons work on most targets, the
+ relevant ABI states that the address of a non-local function in a
+ dynamically linked executable is the address of the PLT entry for
+ that function. This is quite reasonable since using the real
+ function address in a non-PIC executable would typically require
+ dynamic relocations in .text, something to be avoided. For such
+ functions, the linker emits a SHN_UNDEF symbol in the executable
+ with value equal to the PLT entry address. Normally, SHN_UNDEF
+ symbols have a value of zero, so this is a clue to ld.so that it
+ should treat these symbols specially. For relocations not in
+ ELF_RTYPE_CLASS_PLT (eg. those on function pointers), ld.so should
+ use the value of the executable SHN_UNDEF symbol, ie. the PLT entry
+ address. For relocations in ELF_RTYPE_CLASS_PLT (eg. the relocs in
+ the PLT itself), ld.so should use the value of the corresponding
+ defined symbol in the object that defines the function, ie. the
+ real function address. This complicates ld.so in that there are
+ now two possible values for a given symbol, and it gets even worse
+ because protected symbols need yet another set of rules.
+
+ On PowerPC64 we don't need any of this. The linker won't emit
+ SHN_UNDEF symbols with non-zero values. ld.so can make all
+ relocations behave "normally", ie. always use the real address
+ like PLT relocations. So always set ELF_RTYPE_CLASS_PLT. */
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_PPC64_JMP_SLOT)
-
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- of the main executable's symbols, as for a COPY reloc. */
-
-#if !defined RTLD_BOOTSTRAP || USE___THREAD
-#define elf_machine_type_class(type) \
- /* This covers all the TLS relocs, though most won't appear. */ \
- (((((type) >= R_PPC64_DTPMOD64 && (type) <= R_PPC64_TPREL16_HIGHESTA) \
- || (type) == R_PPC64_ADDR24) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
-#else
#define elf_machine_type_class(type) \
- ((((type) == R_PPC64_ADDR24) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
-#endif
+ (ELF_RTYPE_CLASS_PLT | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_PPC64_JMP_SLOT
@@ -282,6 +287,8 @@ BODY_PREFIX "_dl_start_user:\n" \
#define GLINK_INITIAL_ENTRY_WORDS 8
#define PPC_DCBST(where) asm volatile ("dcbst 0,%0" : : "r"(where) : "memory")
+#define PPC_DCBT(where) asm volatile ("dcbt 0,%0" : : "r"(where) : "memory")
+#define PPC_DCBF(where) asm volatile ("dcbf 0,%0" : : "r"(where) : "memory")
#define PPC_SYNC asm volatile ("sync" : : : "memory")
#define PPC_ISYNC asm volatile ("sync; isync" : : : "memory")
#define PPC_ICBI(where) asm volatile ("icbi 0,%0" : : "r"(where) : "memory")
@@ -403,6 +410,11 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
Elf64_FuncDesc *rel = (Elf64_FuncDesc *) finaladdr;
Elf64_Addr offset = 0;
+ PPC_DCBT (&plt->fd_aux);
+ PPC_DCBT (&plt->fd_func);
+ PPC_DCBT (&rel->fd_aux);
+ PPC_DCBT (&rel->fd_func);
+
/* If sym_map is NULL, it's a weak undefined sym; Leave the plt zero. */
if (sym_map == NULL)
return 0;
@@ -425,13 +437,12 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t sym_map,
plt->fd_aux = rel->fd_aux + offset;
plt->fd_toc = rel->fd_toc + offset;
- PPC_DCBST (&plt->fd_aux);
- PPC_DCBST (&plt->fd_toc);
- PPC_SYNC;
+ PPC_DCBF (&plt->fd_toc);
+ PPC_ISYNC;
plt->fd_func = rel->fd_func + offset;
PPC_DCBST (&plt->fd_func);
- PPC_SYNC;
+ PPC_ISYNC;
return finaladdr;
}
diff --git a/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.S b/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
new file mode 100644
index 000000000..9963896f2
--- /dev/null
+++ b/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.S
@@ -0,0 +1,57 @@
+/* isnan(). PowerPC64 version.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isnan(x) */
+ .machine power4
+EALIGN (__isnan, 4, 0)
+ CALL_MCOUNT 0
+ mffs fp0
+ mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */
+ fcmpu cr7,fp1,fp1
+ mtfsf 255,fp0
+ li r3,0
+ beqlr+ cr7 /* (x == x) then not a NAN */
+ li r3,1 /* else must be a NAN */
+ blr
+ END (__isnan)
+
+hidden_def (__isnan)
+weak_alias (__isnan, isnan)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isnan, __isnanf)
+hidden_def (__isnanf)
+weak_alias (__isnanf, isnanf)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isnan, __isnanl)
+weak_alias (__isnan, isnanl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif
+
diff --git a/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.c b/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.c
deleted file mode 100644
index 397717ba9..000000000
--- a/libc/sysdeps/powerpc/powerpc64/fpu/s_isnan.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sysdeps/powerpc/fpu/s_isnan.c>
-#ifndef IS_IN_libm
-# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
-compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
-compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
-# endif
-#endif
diff --git a/libc/sysdeps/powerpc/powerpc64/hp-timing.h b/libc/sysdeps/powerpc/powerpc64/hp-timing.h
index b58cca900..e107a2dd4 100644
--- a/libc/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/libc/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -1,5 +1,5 @@
/* High precision, low overhead timing functions. powerpc64 version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -85,7 +85,11 @@ typedef unsigned long long int hp_timing_t;
running in this moment. This could be changed by using a barrier like
'lwsync' right before the `mftb' instruciton. But we are not interested
in accurate clock cycles here so we don't do this. */
+#ifdef _ARCH_PWR4
+#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mfspr %0,268" : "=r" (Var))
+#else
#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mftb %0" : "=r" (Var))
+#endif
/* Use two 'mftb' instructions in a row to find out how long it takes.
On current POWER4, POWER5, and 970 processors mftb take ~10 cycles. */
diff --git a/libc/time/alt_digit.c b/libc/time/alt_digit.c
index 1a81ba125..95e4f07c7 100644
--- a/libc/time/alt_digit.c
+++ b/libc/time/alt_digit.c
@@ -1,5 +1,5 @@
/* Helper functions used by strftime/strptime to handle alternate digits.
- Copyright (C) 1995-2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
#include <string.h>
/* Some of the functions here must not be used while setlocale is called. */
-__libc_lock_define (extern, __libc_setlocale_lock attribute_hidden)
+__libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
#define CURRENT(item) (current->values[_NL_ITEM_INDEX (item)].string)
#define CURRENT_WSTR(item) \
@@ -77,7 +77,7 @@ _nl_get_alt_digit (unsigned int number, struct locale_data *current)
if (number >= 100 || CURRENT (ALT_DIGITS)[0] == '\0')
return NULL;
- __libc_lock_lock (__libc_setlocale_lock);
+ __libc_rwlock_wrlock (__libc_setlocale_lock);
if (current->private.time == NULL
|| ! current->private.time->alt_digits_initialized)
@@ -88,7 +88,7 @@ _nl_get_alt_digit (unsigned int number, struct locale_data *current)
? current->private.time->alt_digits[number]
: NULL);
- __libc_lock_unlock (__libc_setlocale_lock);
+ __libc_rwlock_unlock (__libc_setlocale_lock);
return result;
}
@@ -104,7 +104,7 @@ _nl_get_walt_digit (unsigned int number, struct locale_data *current)
if (number >= 100 || CURRENT_WSTR (_NL_WALT_DIGITS)[0] == L'\0')
return NULL;
- __libc_lock_lock (__libc_setlocale_lock);
+ __libc_rwlock_wrlock (__libc_setlocale_lock);
if (current->private.time == NULL)
{
@@ -141,7 +141,7 @@ _nl_get_walt_digit (unsigned int number, struct locale_data *current)
result = data->walt_digits[number];
out:
- __libc_lock_unlock (__libc_setlocale_lock);
+ __libc_rwlock_unlock (__libc_setlocale_lock);
return (wchar_t *) result;
}
@@ -159,7 +159,7 @@ _nl_parse_alt_digit (const char **strp, struct locale_data *current)
if (CURRENT_WSTR (_NL_WALT_DIGITS)[0] == L'\0')
return result;
- __libc_lock_lock (__libc_setlocale_lock);
+ __libc_rwlock_wrlock (__libc_setlocale_lock);
if (current->private.time == NULL
|| ! current->private.time->alt_digits_initialized)
@@ -184,7 +184,7 @@ _nl_parse_alt_digit (const char **strp, struct locale_data *current)
}
}
- __libc_lock_unlock (__libc_setlocale_lock);
+ __libc_rwlock_unlock (__libc_setlocale_lock);
if (result != -1)
*strp += maxlen;
diff --git a/libc/time/era.c b/libc/time/era.c
index a8d223733..a6f4a4cb0 100644
--- a/libc/time/era.c
+++ b/libc/time/era.c
@@ -1,5 +1,5 @@
/* Helper functions used by strftime/strptime to handle locale-specific "eras".
- Copyright (C) 1995-2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
#include <string.h>
/* Some of the functions here must not be used while setlocale is called. */
-__libc_lock_define (extern, __libc_setlocale_lock attribute_hidden)
+__libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
#define CURRENT(item) (current->values[_NL_ITEM_INDEX (item)].string)
#define CURRENT_WORD(item) (current->values[_NL_ITEM_INDEX (item)].word)
@@ -45,7 +45,7 @@ _nl_init_era_entries (struct locale_data *current)
if (CURRENT_WORD (_NL_TIME_ERA_NUM_ENTRIES) == 0)
return;
- __libc_lock_lock (__libc_setlocale_lock);
+ __libc_rwlock_wrlock (__libc_setlocale_lock);
if (current->private.time == NULL)
{
@@ -135,7 +135,7 @@ _nl_init_era_entries (struct locale_data *current)
}
out:
- __libc_lock_unlock (__libc_setlocale_lock);
+ __libc_rwlock_unlock (__libc_setlocale_lock);
}
struct era_entry *
diff --git a/libc/timezone/asia b/libc/timezone/asia
index 3007414a7..70f151532 100644
--- a/libc/timezone/asia
+++ b/libc/timezone/asia
@@ -1,4 +1,4 @@
-# @(#)asia 8.12
+# @(#)asia 8.18
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -446,13 +446,13 @@ Zone Asia/Dili 8:22:20 - LMT 1912
# India
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Calcutta 5:53:28 - LMT 1880 # Kolkata
+Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
5:53:20 - HMT 1941 Oct # Howrah Mean Time?
6:30 - BURT 1942 May 15 # Burma Time
5:30 - IST 1942 Sep
5:30 1:00 IST 1945 Oct 15
5:30 - IST
-# The following are like Asia/Calcutta:
+# The following are like Asia/Kolkata:
# Andaman Is
# Lakshadweep (Laccadive, Minicoy and Amindivi Is)
# Nicobar Is
@@ -577,6 +577,15 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
# daylight saving time ...
# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
#
+# From Roozbeh Pournader (2007-11-05):
+# This is quoted from Official Gazette of the Islamic Republic of
+# Iran, Volume 63, Number 18242, dated Tuesday 1386/6/24
+# [2007-10-16]. I am doing the best translation I can:...
+# The official time of the country will be moved forward for one hour
+# on the 24 hours of the first day of the month of Farvardin and will
+# be changed back to its previous state on the 24 hours of the
+# thirtieth day of Shahrivar.
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iran 1978 1980 - Mar 21 0:00 1:00 D
Rule Iran 1978 only - Oct 21 0:00 0 S
@@ -651,6 +660,21 @@ Zone Asia/Tehran 3:25:44 - LMT 1916
#
# So we'll ignore the Economist's claim.
+# From Steffen Thorsen (2008-03-10):
+# The cabinet in Iraq abolished DST last week, according to the following
+# news sources (in Arabic):
+# <a href="http://www.aljeeran.net/wesima_articles/news-20080305-98602.html">
+# http://www.aljeeran.net/wesima_articles/news-20080305-98602.html
+# </a>
+# <a href="http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10">
+# http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10
+# </a>
+#
+# We have published a short article in English about the change:
+# <a href="http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html">
+# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html
+# </a>
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iraq 1982 only - May 1 0:00 1:00 D
Rule Iraq 1982 1984 - Oct 1 0:00 0 S
@@ -661,8 +685,8 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 D
# IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the `:01' is a typo.
# Shanks & Pottenger say Iraq did not observe DST 1992/1997; ignore this.
#
-Rule Iraq 1991 max - Apr 1 3:00s 1:00 D
-Rule Iraq 1991 max - Oct 1 3:00s 0 S
+Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 D
+Rule Iraq 1991 2007 - Oct 1 3:00s 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Baghdad 2:57:40 - LMT 1890
2:57:36 - BMT 1918 # Baghdad Mean Time?
@@ -1678,7 +1702,7 @@ Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1
# kept their clocks set five and a half hours ahead of Greenwich Mean
# Time (GMT), in line with neighbor India.
# From Paul Eggert (2006-04-18):
-# People who live in regions under Tamil control can use TZ='Asia/Calcutta',
+# People who live in regions under Tamil control can use [TZ='Asia/Kolkata'],
# as that zone has agreed with the Tamil areas since our cutoff date of 1970.
# From K Sethu (2006-04-25):
@@ -1768,10 +1792,62 @@ Rule Syria 2006 only - Sep 22 0:00 0 -
# From Paul Eggert (2007-03-29):
# Today the AP reported "Syria will switch to summertime at midnight Thursday."
# http://www.iht.com/articles/ap/2007/03/29/africa/ME-GEN-Syria-Time-Change.php
-# For lack of better info, assume the rule changed to "last Friday in March"
-# this year.
-Rule Syria 2007 max - Mar lastFri 0:00 1:00 S
-Rule Syria 2007 max - Oct 1 0:00 0 -
+Rule Syria 2007 only - Mar lastFri 0:00 1:00 S
+# From Jesper Norgard (2007-10-27):
+# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
+# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
+# rather Midnight between Thursday and Friday. This does make more sence than
+# having it between Wednesday and Thursday (two workdays in Syria) since the
+# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
+# it is implemented at midnight of the last workday before weekend...
+#
+# From Steffen Thorsen (2007-10-27):
+# Jesper Norgaard Welen wrote:
+#
+# > "Winter local time in Syria will be observed at midnight of Thursday 1
+# > November 2007, and the clock will be put back 1 hour."
+#
+# I found confirmation on this in this gov.sy-article (Arabic):
+# http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247
+#
+# which using Google's translate tools says:
+# Council of Ministers also approved the commencement of work on
+# identifying the winter time as of Friday, 2/11/2007 where the 60th
+# minute delay at midnight Thursday 1/11/2007.
+Rule Syria 2007 only - Nov Fri>=1 0:00 0 -
+
+# From Stephen Colebourne (2008-03-17):
+# For everyone's info, I saw an IATA time zone change for [Syria] for
+# this month (March 2008) in the last day or so...This is the data IATA
+# are now using:
+# Country Time Standard --- DST Start --- --- DST End --- DST
+# Name Zone Variation Time Date Time Date
+# Variation
+# Syrian Arab
+# Republic SY +0200 2200 03APR08 2100 30SEP08 +0300
+# 2200 02APR09 2100 30SEP09 +0300
+# 2200 01APR10 2100 30SEP10 +0300
+
+# From Arthur David Olson (2008-03-17):
+# Here's a link to English-language coverage by the Syrian Arab News
+# Agency (SANA)...
+# <a href="http://www.sana.sy/eng/21/2008/03/11/165173.htm">
+# http://www.sana.sy/eng/21/2008/03/11/165173.htm
+# </a>...which reads (in part) "The Cabinet approved the suggestion of the
+# Ministry of Electricity to begin daylight savings time on Friday April
+# 4th, advancing clocks one hour ahead on midnight of Thursday April 3rd."
+# Since Syria is two hours east of UTC, the 2200 and 2100 transition times
+# shown above match up with midnight in Syria.
+
+# From Arthur David Olson (2008-03-18):
+# My buest guess at a Syrian rule is "the Friday nearest April 1";
+# coding that involves either using a "Mar Fri>=29" construct that old time zone
+# compilers can't handle or having multiple Rules (a la Israel).
+# For now, use "Apr Fri>=1", and go with IATA on a uniform Sep 30 end.
+
+Rule Syria 2008 max - Apr Fri>=1 0:00 1:00 S
+Rule Syria 2008 max - Oct 1 0:00 0 -
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq
2:00 Syria EE%sT
@@ -1825,13 +1901,13 @@ Zone Asia/Tashkent 4:37:12 - LMT 1924 May 2
# Vietnam
-# From Paul Eggert (1993-11-18):
-# Saigon's official name is Thanh-Pho Ho Chi Minh, but it's too long.
-# We'll stick with the traditional name for now.
+# From Arthur David Olson (2008-03-18):
+# The English-language name of Vietnam's most populous city is "Ho Chi Min City";
+# we use Ho_Chi_Minh below to avoid a name of more than 14 characters.
# From Shanks & Pottenger:
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Saigon 7:06:40 - LMT 1906 Jun 9
+Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jun 9
7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
7:00 - ICT 1912 May
8:00 - ICT 1931 May
diff --git a/libc/timezone/backward b/libc/timezone/backward
index 7c922604e..a65991c2d 100644
--- a/libc/timezone/backward
+++ b/libc/timezone/backward
@@ -1,4 +1,4 @@
-# @(#)backward 8.3
+# @(#)backward 8.6
# This file provides links between current names for time zones
# and their old names. Many names changed in late 1993.
@@ -24,12 +24,15 @@ Link America/St_Thomas America/Virgin
Link Asia/Ashgabat Asia/Ashkhabad
Link Asia/Chongqing Asia/Chungking
Link Asia/Dhaka Asia/Dacca
+Link Asia/Kolkata Asia/Calcutta
Link Asia/Macau Asia/Macao
Link Asia/Jerusalem Asia/Tel_Aviv
+Link Asia/Ho_Chi_Minh Asia/Saigon
Link Asia/Thimphu Asia/Thimbu
Link Asia/Makassar Asia/Ujung_Pandang
Link Asia/Ulaanbaatar Asia/Ulan_Bator
Link Atlantic/Faroe Atlantic/Faeroe
+Link Europe/Oslo Atlantic/Jan_Mayen
Link Australia/Sydney Australia/ACT
Link Australia/Sydney Australia/Canberra
Link Australia/Lord_Howe Australia/LHI
diff --git a/libc/timezone/europe b/libc/timezone/europe
index 60290ddc5..73eed00fc 100644
--- a/libc/timezone/europe
+++ b/libc/timezone/europe
@@ -1,4 +1,4 @@
-# @(#)europe 8.11
+# @(#)europe 8.12
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -1714,7 +1714,6 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
# come up with more definitive info about the timekeeping during the
# war years it's probably best just do do the following for now:
Link Europe/Oslo Arctic/Longyearbyen
-Link Europe/Oslo Atlantic/Jan_Mayen
# Poland
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
diff --git a/libc/timezone/iso3166.tab b/libc/timezone/iso3166.tab
index 0e985e95b..8d6239958 100644
--- a/libc/timezone/iso3166.tab
+++ b/libc/timezone/iso3166.tab
@@ -1,12 +1,12 @@
# ISO 3166 alpha-2 country codes
#
-# @(#)iso3166.tab 8.4
+# @(#)iso3166.tab 8.5
#
# From Paul Eggert (2006-09-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166-1 alpha-2 country code, current as of
-# ISO 3166-1 Newsletter No. V-12 (2006-09-26). See:
+# ISO 3166-1 Newsletter VI-1 (2007-09-21). See:
# <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
# ISO 3166 Maintenance agency (ISO 3166/MA)
# </a>.
@@ -47,6 +47,7 @@ BG Bulgaria
BH Bahrain
BI Burundi
BJ Benin
+BL St Barthelemy
BM Bermuda
BN Brunei
BO Bolivia
@@ -159,6 +160,7 @@ MA Morocco
MC Monaco
MD Moldova
ME Montenegro
+MF St Martin (French part)
MG Madagascar
MH Marshall Islands
MK Macedonia
diff --git a/libc/timezone/leapseconds b/libc/timezone/leapseconds
index 583451e49..35df858d7 100644
--- a/libc/timezone/leapseconds
+++ b/libc/timezone/leapseconds
@@ -1,4 +1,4 @@
-# @(#)leapseconds 8.4
+# @(#)leapseconds 8.5
# Allowance for leapseconds added to each timezone file.
@@ -46,26 +46,27 @@ Leap 1998 Dec 31 23:59:60 + S
Leap 2005 Dec 31 23:59:60 + S
# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
+#
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
#
# SERVICE DE LA ROTATION TERRESTRE
-# OBSERVATOIRE DE PARIS
+# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
# Tel. : 33 (0) 1 40 51 22 26
# FAX : 33 (0) 1 40 51 22 91
# Internet : services.iers@obspm.fr
#
-# Paris, 28 June 2007
+# Paris, 18 January 2008
#
-# Bulletin C 34
+# Bulletin C 35
#
-# To authorities responsible
+# To authorities responsible
# for the measurement and
-# distribution of time
+# distribution of time
#
# INFORMATION ON UTC - TAI
#
-# NO positive leap second will be introduced at the end of December 2007.
+# NO positive leap second will be introduced at the end of June 2008.
# The difference between Coordinated Universal Time UTC and the
# International Atomic Time TAI is :
#
@@ -77,6 +78,6 @@ Leap 2005 Dec 31 23:59:60 + S
# will be no time step at the next possible date.
#
# Daniel GAMBIS
-# Director
-# Earth Orientation Center of IERS
+# Head
+# Earth Orientation Center of the IERS
# Observatoire de Paris, France
diff --git a/libc/timezone/northamerica b/libc/timezone/northamerica
index 73e13a520..60e5d51e0 100644
--- a/libc/timezone/northamerica
+++ b/libc/timezone/northamerica
@@ -1,4 +1,4 @@
-# @(#)northamerica 8.18
+# @(#)northamerica 8.23
# <pre>
# also includes Central America and the Caribbean
@@ -2187,6 +2187,69 @@ Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose
# says Cuban clocks will advance at midnight on March 10.
# For lack of better information, assume Cuba will use US rules,
# except that it switches at midnight standard time as usual.
+#
+# From Steffen Thorsen (2007-10-25):
+# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week
+# earlier - on the last Sunday of October, just like in 2006.
+#
+# He supplied these references:
+#
+# http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES
+# http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm
+#
+# From Alex Kryvenishev (2007-10-25):
+# Here is also article from Granma (Cuba):
+#
+# [Regira] el Horario Normal desde el [proximo] domingo 28 de octubre
+# http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html
+#
+# http://www.worldtimezone.com/dst_news/dst_news_cuba03.html
+
+# From Arthur David Olson (2008-03-09):
+# I'm in Maryland which is now observing United States Eastern Daylight
+# Time. At 9:44 local time I used RealPlayer to listen to
+# <a href="http://media.enet.cu/radioreloj">
+# http://media.enet.cu/radioreloj
+# </a>, a Cuban information station, and heard
+# the time announced as "ocho cuarenta y cuatro" ("eight forty-four"),
+# indicating that Cuba is still on standard time.
+
+# From Steffen Thorsen (2008-03-12):
+# It seems that Cuba will start DST on Sunday, 2007-03-16...
+# It was announced yesterday, according to this source (in Spanish):
+# <a href="http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm">
+# http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm
+# </a>
+#
+# Some more background information is posted here:
+# <a href="http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html">
+# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html
+# </a>
+#
+# The article also says that Cuba has been observing DST since 1963,
+# while Shanks (and tzdata) has 1965 as the first date (except in the
+# 1940's). Many other web pages in Cuba also claim that it has been
+# observed since 1963, but with the exception of 1970 - an exception
+# which is not present in tzdata/Shanks. So there is a chance we need to
+# change some historic records as well.
+#
+# One example:
+# <a href="http://www.radiohc.cu/espanol/noticias/mar07/11mar/hor.htm">
+# http://www.radiohc.cu/espanol/noticias/mar07/11mar/hor.htm
+# </a>
+
+# From Jesper Norgaard Welen (2008-03-13):
+# The Cuban time change has just been confirmed on the most authoritative
+# web site, the Granma. Please check out
+# <a href="http://www.granma.cubaweb.cu/2008/03/13/nacional/artic10.html">
+# http://www.granma.cubaweb.cu/2008/03/13/nacional/artic10.html
+# </a>
+#
+# Basically as expected after Steffen Thorsens information, the change
+# will take place midnight between Saturday and Sunday.
+
+# From Arthur David Olson (2008-03-12):
+# Assume Sun>=15 (third Sunday) going forward.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cuba 1928 only - Jun 10 0:00 1:00 D
@@ -2218,9 +2281,9 @@ Rule Cuba 1997 only - Oct 12 0:00s 0 S
Rule Cuba 1998 1999 - Mar lastSun 0:00s 1:00 D
Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S
Rule Cuba 2000 2006 - Apr Sun>=1 0:00s 1:00 D
-Rule Cuba 2006 only - Oct lastSun 0:00s 0 S
-Rule Cuba 2007 max - Mar Sun>=8 0:00s 1:00 D
-Rule Cuba 2007 max - Nov Sun>=1 0:00s 0 S
+Rule Cuba 2006 max - Oct lastSun 0:00s 0 S
+Rule Cuba 2007 only - Mar Sun>=8 0:00s 1:00 D
+Rule Cuba 2008 max - Mar Sun>=15 0:00s 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Havana -5:29:28 - LMT 1890
@@ -2287,6 +2350,10 @@ Zone America/Grenada -4:07:00 - LMT 1911 Jul # St George's
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe a Pitre
-4:00 - AST
+# St Barthelemy
+Link America/Guadeloupe America/St_Barthelemy
+# St Martin (French part)
+Link America/Guadeloupe America/Marigot
# Guatemala
#
diff --git a/libc/timezone/private.h b/libc/timezone/private.h
index d64c724ef..008d468ac 100644
--- a/libc/timezone/private.h
+++ b/libc/timezone/private.h
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 8.3";
+static char privatehid[] = "@(#)private.h 8.6";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -48,10 +48,6 @@ static char privatehid[] = "@(#)private.h 8.3";
#define HAVE_SETTIMEOFDAY 3
#endif /* !defined HAVE_SETTIMEOFDAY */
-#ifndef HAVE_STRERROR
-#define HAVE_STRERROR 1
-#endif /* !defined HAVE_STRERROR */
-
#ifndef HAVE_SYMLINK
#define HAVE_SYMLINK 1
#endif /* !defined HAVE_SYMLINK */
@@ -109,17 +105,15 @@ static char privatehid[] = "@(#)private.h 8.3";
#endif /* !defined WEXITSTATUS */
#if HAVE_UNISTD_H
-#include "unistd.h" /* for F_OK and R_OK */
+#include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */
#endif /* HAVE_UNISTD_H */
-#if !HAVE_UNISTD_H
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
-#endif /* !HAVE_UNISTD_H */
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
@@ -165,91 +159,27 @@ typedef long int_fast64_t;
*/
/*
-** If your compiler lacks prototypes, "#define P(x) ()".
-*/
-
-#ifndef P
-#define P(x) x
-#endif /* !defined P */
-
-/*
-** SunOS 4.1.1 headers lack EXIT_SUCCESS.
-*/
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif /* !defined EXIT_SUCCESS */
-
-/*
-** SunOS 4.1.1 headers lack EXIT_FAILURE.
-*/
-
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif /* !defined EXIT_FAILURE */
-
-/*
-** SunOS 4.1.1 headers lack FILENAME_MAX.
-*/
-
-#ifndef FILENAME_MAX
-
-#ifndef MAXPATHLEN
-#ifdef unix
-#include "sys/param.h"
-#endif /* defined unix */
-#endif /* !defined MAXPATHLEN */
-
-#ifdef MAXPATHLEN
-#define FILENAME_MAX MAXPATHLEN
-#endif /* defined MAXPATHLEN */
-#ifndef MAXPATHLEN
-#define FILENAME_MAX 1024 /* Pure guesswork */
-#endif /* !defined MAXPATHLEN */
-
-#endif /* !defined FILENAME_MAX */
-
-/*
-** SunOS 4.1.1 libraries lack remove.
-*/
-
-#ifndef remove
-extern int unlink P((const char * filename));
-#define remove unlink
-#endif /* !defined remove */
-
-/*
-** Some ancient errno.h implementations don't declare errno.
-** But some newer errno.h implementations define it as a macro.
-** Fix the former without affecting the latter.
-*/
-
-#ifndef errno
-extern int errno;
-#endif /* !defined errno */
-
-/*
** Some time.h implementations don't declare asctime_r.
** Others might define it as a macro.
** Fix the former without affecting the latter.
*/
#ifndef asctime_r
-extern char * asctime_r();
+extern char * asctime_r(struct tm const *, char *);
#endif
/*
** Private function declarations.
*/
-char * icalloc P((int nelem, int elsize));
-char * icatalloc P((char * old, const char * new));
-char * icpyalloc P((const char * string));
-char * imalloc P((int n));
-void * irealloc P((void * pointer, int size));
-void icfree P((char * pointer));
-void ifree P((char * pointer));
-const char * scheck P((const char * string, const char * format));
+char * icalloc(int nelem, int elsize);
+char * icatalloc(char * old, const char * new);
+char * icpyalloc(const char * string);
+char * imalloc(int n);
+void * irealloc(void * pointer, int size);
+void icfree(char * pointer);
+void ifree(char * pointer);
+const char * scheck(const char * string, const char * format);
/*
** Finally, some convenience items.
@@ -337,8 +267,8 @@ const char * scheck P((const char * string, const char * format));
#if HAVE_INCOMPATIBLE_CTIME_R
#undef asctime_r
#undef ctime_r
-char *asctime_r P((struct tm const *, char *));
-char *ctime_r P((time_t const *, char *));
+char *asctime_r(struct tm const *, char *);
+char *ctime_r(time_t const *, char *);
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
#ifndef YEARSPERREPEAT
diff --git a/libc/timezone/southamerica b/libc/timezone/southamerica
index bfda82764..43f73d323 100644
--- a/libc/timezone/southamerica
+++ b/libc/timezone/southamerica
@@ -1,4 +1,4 @@
-# @(#)southamerica 8.12
+# @(#)southamerica 8.19
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -105,7 +105,11 @@ Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S
# which did not result in the switch of a time zone, as they stayed 9 hours
# from the International Date Line.
Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 S
-Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
+# From Paul Eggert (2007-12-28):
+# DST was set to expire on March 5, not March 3, but since it was converted
+# to standard time on March 3 it's more convenient for us to pretend that
+# it ended on March 3.
+Rule Arg 2000 only - Mar 3 0:00 0 -
#
# From Peter Gradelski via Steffen Thorsen (2000-03-01):
# We just checked with our Sao Paulo office and they say the government of
@@ -140,6 +144,30 @@ Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
# This kind of things had always been done this way in Argentina.
# We are still -03:00 all year round in all of the country.
#
+# From Steffen Thorsen (2007-12-21):
+# A user (Leonardo Chaim) reported that Argentina will adopt DST....
+# all of the country (all Zone-entries) are affected. News reports like
+# http://www.lanacion.com.ar/opinion/nota.asp?nota_id=973037 indicate
+# that Argentina will use DST next year as well, from October to
+# March, although exact rules are not given.
+#
+# From Jesper Norgaard Welen (2007-12-26)
+# The last hurdle of Argentina DST is over, the proposal was approved in
+# the lower chamber too (Deputados) with a vote 192 for and 2 against.
+# By the way thanks to Mariano Absatz and Daniel Mario Vega for the link to
+# the original scanned proposal, where the dates and the zero hours are
+# clear and unambiguous...This is the article about final approval:
+# <a href="http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996">
+# http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996
+# </a>
+#
+# From Paul Eggert (2007-12-22):
+# For dates after mid-2008, the following rules are my guesses and
+# are quite possibly wrong, but are more likely than no DST at all.
+Rule Arg 2007 only - Dec 30 0:00 1:00 S
+Rule Arg 2008 max - Mar Sun>=15 0:00 0 -
+Rule Arg 2008 max - Oct Sun>=1 0:00 1:00 S
+
# From Mariano Absatz (2004-05-21):
# Today it was officially published that the Province of Mendoza is changing
# its timezone this winter... starting tomorrow night....
@@ -200,6 +228,76 @@ Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
# http://www.sanjuan.gov.ar/prensa/archivo/000426.html
# http://www.sanjuan.gov.ar/prensa/archivo/000441.html
+# From Alex Krivenyshev (2008-01-17):
+# Here are articles that Argentina Province San Luis is planning to end DST
+# as earlier as upcoming Monday January 21, 2008 or February 2008:
+#
+# Provincia argentina retrasa reloj y marca diferencia con resto del pais
+# (Argentine Province delayed clock and mark difference with the rest of the
+# country)
+# <a href="http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel">
+# http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel
+# </a>
+#
+# Es inminente que en San Luis atrasen una hora los relojes
+# (It is imminent in San Luis clocks one hour delay)
+# <a href="http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414">
+# http://www.lagaceta.com.ar/vernotae.asp?id_nota=253414
+# </a>
+#
+# <a href="http://www.worldtimezone.net/dst_news/dst_news_argentina02.html">
+# http://www.worldtimezone.net/dst_news/dst_news_argentina02.html
+# </a>
+
+# From Jesper Norgaard Welen (2008-01-18):
+# The page of the San Luis provincial government
+# <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812">
+# http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812
+# </a>
+# confirms what Alex Krivenyshev has earlier sent to the tz
+# emailing list about that San Luis plans to return to standard
+# time much earlier than the rest of the country. It also
+# confirms that upon request the provinces San Juan and Mendoza
+# refused to follow San Luis in this change.
+#
+# The change is supposed to take place Monday the 21.st at 0:00
+# hours. As far as I understand it if this goes ahead, we need
+# a new timezone for San Luis (although there are also documented
+# independent changes in the southamerica file of San Luis in
+# 1990 and 1991 which has not been confirmed).
+
+# From Jesper Norgaard Welen (2008-01-25):
+# Unfortunately the below page has become defunct, about the San Luis
+# time change. Perhaps because it now is part of a group of pages "Most
+# important pages of 2008."
+#
+# You can use
+# <a href="http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834">
+# http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834
+# </a>
+# instead it seems. Or use "Buscador" from the main page of the San Luis
+# government, and fill in "huso" and click OK, and you will get 3 pages
+# from which the first one is identical to the above.
+
+# From Mariano Absatz (2008-01-28):
+# I can confirm that the Province of San Luis (and so far only that
+# province) decided to go back to UTC-3 effective midnight Jan 20th 2008
+# (that is, Monday 21st at 0:00 is the time the clocks were delayed back
+# 1 hour), and they intend to keep UTC-3 as their timezone all year round
+# (that is, unless they change their mind any minute now).
+#
+# So we'll have to add yet another city to 'southamerica' (I think San
+# Luis city is the mos populated city in the Province, so it'd be
+# America/Argentina/San_Luis... of course I can't remember if San Luis's
+# history of particular changes goes along with Mendoza or San Juan :-(
+# (I only remember not being able to collect hard facts about San Luis
+# back in 2004, when these provinces changed to UTC-4 for a few days, I
+# mailed them personally and never got an answer).
+
+# From Arthur David Olson (2008-03-15):
+# Until there's better information, asssume San Luis was like San Juan
+# rather than Mendoza (since San Juan has a simpler DST history).
+
# Unless otherwise specified, data are from Shanks & Pottenger through 1992,
# from the IATA otherwise. As noted below, Shanks & Pottenger say that
# America/Cordoba split into 6 subregions during 1991/1992, but we
@@ -214,7 +312,7 @@ Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
# Formosa (FM), Salta (SA), Santiago del Estero (SE), Cordoba (CB),
@@ -237,7 +335,7 @@ Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31
-4:00 - WART 1991 Oct 20
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Tucuman (TM)
Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31
@@ -250,7 +348,7 @@ Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 Jun 1
-4:00 - WART 2004 Jun 13
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# La Rioja (LR)
Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31
@@ -263,7 +361,7 @@ Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 Jun 1
-4:00 - WART 2004 Jun 20
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# San Juan (SJ)
Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31
@@ -276,7 +374,7 @@ Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 May 31
-4:00 - WART 2004 Jul 25
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Jujuy (JY)
Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31
@@ -290,7 +388,7 @@ Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31
-3:00 1:00 ARST 1992
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Catamarca (CT), Chubut (CH)
Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31
@@ -303,7 +401,7 @@ Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 Jun 1
-4:00 - WART 2004 Jun 20
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Mendoza (MZ)
Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
@@ -320,6 +418,20 @@ Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 May 23
-4:00 - WART 2004 Sep 26
+ -3:00 Arg AR%sT
+#
+# San Luis (SL)
+Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31
+ -4:16:48 - CMT 1920 May
+ -4:00 - ART 1930 Dec
+ -4:00 Arg AR%sT 1969 Oct 5
+ -3:00 Arg AR%sT 1991 Mar 1
+ -4:00 - WART 1991 May 7
+ -3:00 Arg AR%sT 1999 Oct 3
+ -4:00 Arg AR%sT 2000 Mar 3
+ -3:00 - ART 2004 May 31
+ -4:00 - WART 2004 Jul 25
+ -3:00 Arg AR%sT 2008 Jan 21
-3:00 - ART
#
# Santa Cruz (SC)
@@ -331,7 +443,7 @@ Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 Jun 1
-4:00 - WART 2004 Jun 20
- -3:00 - ART
+ -3:00 Arg AR%sT
#
# Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF)
Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
@@ -342,7 +454,7 @@ Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 May 30
-4:00 - WART 2004 Jun 20
- -3:00 - ART
+ -3:00 Arg AR%sT
# Aruba
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -731,6 +843,26 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# America/Santiago. The pre-1980 Pacific/Easter data are dubious,
# but we have no other source.
+# From German Poo-Caaman~o (2008-03-03):
+# Due to drought, Chile extends Daylight Time in three weeks. This
+# is one-time change (Saturday 3/29 at 24:00 for America/Santiago
+# and Saturday 3/29 at 22:00 for Pacific/Easter)
+# The Supreme Decree is located at
+# <a href="http://www.shoa.cl/servicios/supremo316.pdf">
+# http://www.shoa.cl/servicios/supremo316.pdf
+# </a>
+# and the instructions for 2008 are located in:
+# <a href="http://www.horaoficial.cl/cambio.htm">
+# http://www.horaoficial.cl/cambio.htm
+# </a>.
+
+# From José Miguel Garrido (2008-03-05):
+# ...
+# You could see the announces of the change on
+# <a href="http://www.shoa.cl/noticias/2008/04hora/hora.htm">
+# http://www.shoa.cl/noticias/2008/04hora/hora.htm
+# </a>.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1932 - Sep 1 0:00 1:00 S
Rule Chile 1928 1932 - Apr 1 0:00 0 -
@@ -761,7 +893,11 @@ Rule Chile 1998 only - Mar Sun>=9 3:00u 0 -
Rule Chile 1998 only - Sep 27 4:00u 1:00 S
Rule Chile 1999 only - Apr 4 3:00u 0 -
Rule Chile 1999 max - Oct Sun>=9 4:00u 1:00 S
-Rule Chile 2000 max - Mar Sun>=9 3:00u 0 -
+Rule Chile 2000 2007 - Mar Sun>=9 3:00u 0 -
+# N.B.: the end of March 29 in Chile is March 30 in Universal time,
+# which is used below in specifying the transition.
+Rule Chile 2008 only - Mar 30 3:00u 0 -
+Rule Chile 2009 max - Mar Sun>=9 3:00u 0 -
# IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -1107,19 +1243,17 @@ Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28
# Venezuela
#
-# From Kiraz Janicke (2007-09-25), in
-# http://www.venezuelanalysis.com/analysis/2645:
-# The proposal ... involves turning the clock back half an hour from
-# +4.00 Greenwich Mean Time (GMT), to +4.30GMT, the time zone
-# Venezuela had until December 31, 1964, when the current time zone
-# was adopted. The change was due to take place on September 17 and
-# then on September 24, but has since been postponed until December
-# 31, to allow for compliance with international organizations, such
-# as the International Office of Weights and Measures.
+# From John Stainforth (2007-11-28):
+# ... the change for Venezuela originally expected for 2007-12-31 has
+# been brought forward to 2007-12-09. The official announcement was
+# published today in the "Gaceta Oficial de la Republica Bolivariana
+# de Venezuela, numero 38.819" (official document for all laws or
+# resolution publication)
+# http://www.globovision.com/news.php?nid=72208
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Caracas -4:27:44 - LMT 1890
-4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time?
-4:30 - VET 1965 # Venezuela Time
- -4:00 - VET 2008
+ -4:00 - VET 2007 Dec 9 03:00
-4:30 - VET
diff --git a/libc/timezone/zdump.c b/libc/timezone/zdump.c
index 6bf540aef..82c91e485 100644
--- a/libc/timezone/zdump.c
+++ b/libc/timezone/zdump.c
@@ -1,4 +1,4 @@
-static char elsieid[] = "@(#)zdump.c 8.4";
+static char elsieid[] = "@(#)zdump.c 8.6";
/*
** This code has been made independent of the rest of the time
@@ -88,6 +88,9 @@ static char elsieid[] = "@(#)zdump.c 8.4";
#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR)
#define SECSPERLYEAR (SECSPERNYEAR + SECSPERDAY)
+#ifndef HAVE_GETTEXT
+#define HAVE_GETTEXT 0
+#endif
#if HAVE_GETTEXT
#include "locale.h" /* for setlocale */
#include "libintl.h"
@@ -129,13 +132,9 @@ static char elsieid[] = "@(#)zdump.c 8.4";
#define TZ_DOMAIN "tz"
#endif /* !defined TZ_DOMAIN */
-#ifndef P
-#define P(x) x
-#endif /* !defined P */
-
extern char ** environ;
-extern int getopt P((int argc, char * const argv[],
- const char * options));
+extern int getopt(int argc, char * const argv[],
+ const char * options);
extern char * optarg;
extern int optind;
extern char * tzname[2];
@@ -146,15 +145,15 @@ static size_t longest;
static char * progname;
static int warned;
-static char * abbr P((struct tm * tmp));
-static void abbrok P((const char * abbrp, const char * zone));
-static long delta P((struct tm * newp, struct tm * oldp));
-static void dumptime P((const struct tm * tmp));
-static time_t hunt P((char * name, time_t lot, time_t hit));
-static void setabsolutes P((void));
-static void show P((char * zone, time_t t, int v));
-static const char * tformat P((void));
-static time_t yeartot P((long y));
+static char * abbr(struct tm * tmp);
+static void abbrok(const char * abbrp, const char * zone);
+static long delta(struct tm * newp, struct tm * oldp);
+static void dumptime(const struct tm * tmp);
+static time_t hunt(char * name, time_t lot, time_t hit);
+static void setabsolutes(void);
+static void show(char * zone, time_t t, int v);
+static const char * tformat(void);
+static time_t yeartot(long y);
#ifndef TYPECHECK
#define my_localtime localtime
@@ -394,7 +393,7 @@ _("%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"),
}
static void
-setabsolutes()
+setabsolutes(void)
{
if (0.5 == (time_t) 0.5) {
/*
@@ -592,7 +591,7 @@ struct tm * tmp;
*/
static const char *
-tformat()
+tformat(void)
{
if (0.5 == (time_t) 0.5) { /* floating */
if (sizeof (time_t) > sizeof (double))
diff --git a/libc/timezone/zic.c b/libc/timezone/zic.c
index 3cb0b171f..5f8028e48 100644
--- a/libc/timezone/zic.c
+++ b/libc/timezone/zic.c
@@ -3,7 +3,7 @@
** 2006-07-17 by Arthur David Olson.
*/
-static char elsieid[] = "@(#)zic.c 8.14";
+static char elsieid[] = "@(#)zic.c 8.17";
#include "private.h"
#include "locale.h"
@@ -99,70 +99,66 @@ struct zone {
zic_t z_untiltime;
};
-extern int getopt P((int argc, char * const argv[],
- const char * options));
-extern int link P((const char * fromname, const char * toname));
+extern int getopt(int argc, char * const argv[],
+ const char * options);
+extern int link(const char * fromname, const char * toname);
extern char * optarg;
extern int optind;
-static void addtt P((zic_t starttime, int type));
-static int addtype P((long gmtoff, const char * abbr, int isdst,
- int ttisstd, int ttisgmt));
-static void leapadd P((zic_t t, int positive, int rolling, int count));
-static void adjleap P((void));
-static void associate P((void));
-static int ciequal P((const char * ap, const char * bp));
-static void convert P((long val, char * buf));
-static void convert64 P((zic_t val, char * buf));
-static void dolink P((const char * fromfield, const char * tofield));
-static void doabbr P((char * abbr, const char * format,
- const char * letters, int isdst, int doquotes));
-static void eat P((const char * name, int num));
-static void eats P((const char * name, int num,
- const char * rname, int rnum));
-static long eitol P((int i));
-static void error P((const char * message));
-static char ** getfields P((char * buf));
-static long gethms P((const char * string, const char * errstrng,
- int signable));
-static void infile P((const char * filename));
-static void inleap P((char ** fields, int nfields));
-static void inlink P((char ** fields, int nfields));
-static void inrule P((char ** fields, int nfields));
-static int inzcont P((char ** fields, int nfields));
-static int inzone P((char ** fields, int nfields));
-static int inzsub P((char ** fields, int nfields, int iscont));
-static int is32 P((zic_t x));
-static int itsabbr P((const char * abbr, const char * word));
-static int itsdir P((const char * name));
-static int lowerit P((int c));
-static char * memcheck P((char * tocheck));
-static int mkdirs P((char * filename));
-static void newabbr P((const char * abbr));
-static long oadd P((long t1, long t2));
-static void outzone P((const struct zone * zp, int ntzones));
-static void puttzcode P((long code, FILE * fp));
-static void puttzcode64 P((zic_t code, FILE * fp));
-static int rcomp P((const void * leftp, const void * rightp));
-static zic_t rpytime P((const struct rule * rp, int wantedy));
-static void rulesub P((struct rule * rp,
+static void addtt(zic_t starttime, int type);
+static int addtype(long gmtoff, const char * abbr, int isdst,
+ int ttisstd, int ttisgmt);
+static void leapadd(zic_t t, int positive, int rolling, int count);
+static void adjleap(void);
+static void associate(void);
+static int ciequal(const char * ap, const char * bp);
+static void convert(long val, char * buf);
+static void convert64(zic_t val, char * buf);
+static void dolink(const char * fromfield, const char * tofield);
+static void doabbr(char * abbr, const char * format,
+ const char * letters, int isdst, int doquotes);
+static void eat(const char * name, int num);
+static void eats(const char * name, int num,
+ const char * rname, int rnum);
+static long eitol(int i);
+static void error(const char * message);
+static char ** getfields(char * buf);
+static long gethms(const char * string, const char * errstrng,
+ int signable);
+static void infile(const char * filename);
+static void inleap(char ** fields, int nfields);
+static void inlink(char ** fields, int nfields);
+static void inrule(char ** fields, int nfields);
+static int inzcont(char ** fields, int nfields);
+static int inzone(char ** fields, int nfields);
+static int inzsub(char ** fields, int nfields, int iscont);
+static int is32(zic_t x);
+static int itsabbr(const char * abbr, const char * word);
+static int itsdir(const char * name);
+static int lowerit(int c);
+static char * memcheck(char * tocheck);
+static int mkdirs(char * filename);
+static void newabbr(const char * abbr);
+static long oadd(long t1, long t2);
+static void outzone(const struct zone * zp, int ntzones);
+static void puttzcode(long code, FILE * fp);
+static void puttzcode64(zic_t code, FILE * fp);
+static int rcomp(const void * leftp, const void * rightp);
+static zic_t rpytime(const struct rule * rp, int wantedy);
+static void rulesub(struct rule * rp,
const char * loyearp, const char * hiyearp,
const char * typep, const char * monthp,
- const char * dayp, const char * timep));
-static int stringoffset P((char * result, long offset));
-static int stringrule P((char * result, const struct rule * rp,
- long dstoff, long gmtoff));
-static void stringzone P((char * result,
- const struct zone * zp, int ntzones));
-static void setboundaries P((void));
-static zic_t tadd P((zic_t t1, long t2));
-static void usage P((void));
-static void writezone P((const char * name, const char * string));
-static int yearistype P((int year, const char * type));
-
-#if !HAVE_STRERROR
-static char * strerror P((int));
-#endif /* !HAVE_STRERROR */
+ const char * dayp, const char * timep);
+static int stringoffset(char * result, long offset);
+static int stringrule(char * result, const struct rule * rp,
+ long dstoff, long gmtoff);
+static void stringzone(char * result,
+ const struct zone * zp, int ntzones);
+static void setboundaries(void);
+static zic_t tadd(zic_t t1, long t2);
+static void usage(void);
+static void writezone(const char * name, const char * string);
+static int yearistype(int year, const char * type);
static int charcnt;
static int errors;
@@ -287,8 +283,8 @@ struct lookup {
const int l_value;
};
-static struct lookup const * byword P((const char * string,
- const struct lookup * lp));
+static struct lookup const * byword(const char * string,
+ const struct lookup * lp);
static struct lookup const line_codes[] = {
{ "Rule", LC_RULE },
@@ -405,19 +401,6 @@ char * const ptr;
** Error handling.
*/
-#if !HAVE_STRERROR
-static char *
-strerror(errnum)
-int errnum;
-{
- extern char * sys_errlist[];
- extern int sys_nerr;
-
- return (errnum > 0 && errnum <= sys_nerr) ?
- sys_errlist[errnum] : _("Unknown system error");
-}
-#endif /* !HAVE_STRERROR */
-
static void
eats(name, num, rname, rnum)
const char * const name;
@@ -471,7 +454,7 @@ const char * const string;
}
static void
-usage P((void))
+usage(void)
{
(void) fprintf(stderr, _("%s: usage is %s \
[ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
@@ -699,7 +682,7 @@ warning(_("hard link failed, symbolic link used"));
#define TIME_T_BITS_IN_FILE 64
static void
-setboundaries P((void))
+setboundaries(void)
{
register int i;
@@ -741,7 +724,7 @@ const void * cp2;
}
static void
-associate P((void))
+associate(void)
{
register struct zone * zp;
register struct rule * rp;
@@ -2012,7 +1995,8 @@ const int zonecount;
}
for (i = 0; i < zonecount; ++i) {
zp = &zpfirst[i];
- updateminmax(zp->z_untilrule.r_loyear);
+ if (i < zonecount - 1)
+ updateminmax(zp->z_untilrule.r_loyear);
for (j = 0; j < zp->z_nrules; ++j) {
rp = &zp->z_rules[j];
if (rp->r_lowasnum)
@@ -2043,8 +2027,11 @@ wp = ecpyalloc(_("no POSIX environment variable for zone"));
else max_year = INT_MAX;
}
/*
- ** For the benefit of older systems, generate data through 2037.
+ ** For the benefit of older systems,
+ ** generate data from 1900 through 2037.
*/
+ if (min_year > 1900)
+ min_year = 1900;
if (max_year < 2037)
max_year = 2037;
for (i = 0; i < zonecount; ++i) {
@@ -2331,7 +2318,7 @@ int count;
}
static void
-adjleap P((void))
+adjleap(void)
{
register int i;
register long last = 0;
diff --git a/libc/timezone/zone.tab b/libc/timezone/zone.tab
index 8d4333ad9..1647036c0 100644
--- a/libc/timezone/zone.tab
+++ b/libc/timezone/zone.tab
@@ -1,4 +1,4 @@
-# @(#)zone.tab 8.11
+# @(#)zone.tab 8.16
#
# TZ zone descriptions
#
@@ -42,7 +42,8 @@ AQ -7824+10654 Antarctica/Vostok Vostok Station, S Magnetic Pole
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
-AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF, SL)
+AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF)
+AR -3319-06621 America/Argentina/San_Luis San Luis (SL)
AR -2411-06518 America/Argentina/Jujuy Jujuy (JY)
AR -2649-06513 America/Argentina/Tucuman Tucuman (TM)
AR -2828-06547 America/Argentina/Catamarca Catamarca (CT), Chubut (CH)
@@ -77,6 +78,7 @@ BG +4241+02319 Europe/Sofia
BH +2623+05035 Asia/Bahrain
BI -0323+02922 Africa/Bujumbura
BJ +0629+00237 Africa/Porto-Novo
+BL +1753-06251 America/St_Barthelemy
BM +3217-06446 Atlantic/Bermuda
BN +0456+11455 Asia/Brunei
BO -1630-06809 America/La_Paz
@@ -208,7 +210,7 @@ ID -0232+14042 Asia/Jayapura Irian Jaya & the Moluccas
IE +5320-00615 Europe/Dublin
IL +3146+03514 Asia/Jerusalem
IM +5409-00428 Europe/Isle_of_Man
-IN +2232+08822 Asia/Calcutta
+IN +2232+08822 Asia/Kolkata
IO -0720+07225 Indian/Chagos
IQ +3321+04425 Asia/Baghdad
IR +3540+05126 Asia/Tehran
@@ -250,6 +252,7 @@ MA +3339-00735 Africa/Casablanca
MC +4342+00723 Europe/Monaco
MD +4700+02850 Europe/Chisinau
ME +4226+01916 Europe/Podgorica
+MF +1804-06305 America/Marigot
MG -1855+04731 Indian/Antananarivo
MH +0709+17112 Pacific/Majuro most locations
MH +0905+16720 Pacific/Kwajalein Kwajalein
@@ -339,8 +342,7 @@ SE +5920+01803 Europe/Stockholm
SG +0117+10351 Asia/Singapore
SH -1555-00542 Atlantic/St_Helena
SI +4603+01431 Europe/Ljubljana
-SJ +7800+01600 Arctic/Longyearbyen Svalbard
-SJ +7059-00805 Atlantic/Jan_Mayen Jan Mayen
+SJ +7800+01600 Arctic/Longyearbyen
SK +4809+01707 Europe/Bratislava
SL +0830-01315 Africa/Freetown
SM +4355+01228 Europe/San_Marino
@@ -410,7 +412,7 @@ VC +1309-06114 America/St_Vincent
VE +1030-06656 America/Caracas
VG +1827-06437 America/Tortola
VI +1821-06456 America/St_Thomas
-VN +1045+10640 Asia/Saigon
+VN +1045+10640 Asia/Ho_Chi_Minh
VU -1740+16825 Pacific/Efate
WF -1318-17610 Pacific/Wallis
WS -1350-17144 Pacific/Apia
diff --git a/libc/version.h b/libc/version.h
index 9ac2ee7ad..97aa661e6 100644
--- a/libc/version.h
+++ b/libc/version.h
@@ -1,4 +1,4 @@
/* This file just defines the current version number of libc. */
-#define RELEASE "development"
-#define VERSION "2.7.90"
+#define RELEASE "stable"
+#define VERSION "2.8"
diff --git a/libc/wcsmbs/wcsmbsload.c b/libc/wcsmbs/wcsmbsload.c
index 6531775ce..6061e4200 100644
--- a/libc/wcsmbs/wcsmbsload.c
+++ b/libc/wcsmbs/wcsmbsload.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002,2004,2005,2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -147,7 +147,7 @@ __wcsmbs_getfct (const char *to, const char *from, size_t *nstepsp)
#if __OPTION_EGLIBC_LOCALE_CODE
/* Some of the functions here must not be used while setlocale is called. */
-__libc_lock_define (extern, __libc_setlocale_lock attribute_hidden)
+__libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
/* Load conversion functions for the currently selected locale. */
void
@@ -155,7 +155,7 @@ internal_function
__wcsmbs_load_conv (struct locale_data *new_category)
{
/* Acquire the lock. */
- __libc_lock_lock (__libc_setlocale_lock);
+ __libc_rwlock_wrlock (__libc_setlocale_lock);
/* We should repeat the test since while we waited some other thread
might have run this function. */
@@ -213,7 +213,7 @@ __wcsmbs_load_conv (struct locale_data *new_category)
}
}
- __libc_lock_unlock (__libc_setlocale_lock);
+ __libc_rwlock_unlock (__libc_setlocale_lock);
}
#else
void