aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-03-31 17:23:57 +0000
committerJakub Jelinek <jakub@redhat.com>2007-03-31 17:23:57 +0000
commiteae077f1c3de8572b3616b29cd53e72ca054b280 (patch)
tree9bf840af92e910b83914716b4172f41291670871
parentUpdated to fedora-glibc-20070317T2130 (diff)
downloadglibc-cvs/fedora-glibc-2_5_90-20.tar.gz
glibc-cvs/fedora-glibc-2_5_90-20.tar.bz2
glibc-cvs/fedora-glibc-2_5_90-20.zip
Updated to fedora-glibc-20070331T1609cvs/fedora-glibc-2_5_90-20
-rw-r--r--ChangeLog137
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure4
-rw-r--r--configure.in4
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in10
-rw-r--r--nis/nis_call.c368
-rw-r--r--nis/nis_lookup.c15
-rw-r--r--nis/nis_table.c15
-rw-r--r--nis/nss_nisplus/nisplus-ethers.c9
-rw-r--r--nis/nss_nisplus/nisplus-network.c11
-rw-r--r--nis/nss_nisplus/nisplus-pwd.c6
-rw-r--r--nis/nss_nisplus/nisplus-rpc.c11
-rw-r--r--nis/nss_nisplus/nisplus-service.c11
-rw-r--r--nis/nss_nisplus/nisplus-spwd.c5
-rw-r--r--nis/rpcsvc/nislib.h9
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h5
-rw-r--r--nscd/gai.c3
-rw-r--r--nscd/selinux.c16
-rw-r--r--nscd/selinux.h4
-rwxr-xr-xscripts/check-local-headers.sh1
-rw-r--r--soft-fp/double.h14
-rw-r--r--soft-fp/extended.h16
-rw-r--r--soft-fp/quad.h18
-rw-r--r--sysdeps/powerpc/bits/atomic.h15
-rw-r--r--sysdeps/powerpc/powerpc32/bits/atomic.h46
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.c17
-rw-r--r--sysdeps/powerpc/powerpc32/memset.S10
-rw-r--r--sysdeps/powerpc/powerpc64/bits/atomic.h62
-rw-r--r--sysdeps/powerpc/powerpc64/memset.S9
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/Versions4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c14
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/libc-start.c12
-rw-r--r--timezone/africa6
-rw-r--r--timezone/asia40
-rw-r--r--timezone/australasia88
-rw-r--r--timezone/backward4
-rw-r--r--timezone/europe66
-rw-r--r--timezone/iso3166.tab4
-rw-r--r--timezone/leapseconds60
-rw-r--r--timezone/northamerica144
-rw-r--r--timezone/private.h4
-rw-r--r--timezone/southamerica30
-rw-r--r--timezone/zdump.c2
-rw-r--r--timezone/zic.c11
-rw-r--r--timezone/zone.tab23
48 files changed, 972 insertions, 406 deletions
diff --git a/ChangeLog b/ChangeLog
index 44efc91d07..0eff0121e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,140 @@
+2007-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ * scripts/check-local-headers.sh: Filter out sys/capability.h.
+
+2007-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ * config.h.in (HAVE_LIBCAP): Add.
+ * nscd/selinux.h: Include sys/capability.h rather than non-existent
+ sys/capabilities.h.
+ * nscd/selinux.c (preserve_capabilities): Use cap_free instead of
+ free_caps. Cast away const from 4th cap_set_flag argument.
+
+2007-03-26 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/Versions: Move sync_file_range to
+ GLIBC_2.6.
+ * sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines):
+ Add sync_file_range.
+ Reported by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
+
+2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/powerpc/bits/atomic.h
+ [!MUTEX_HINT_ACQ]: Define MUTEX_HINT_ACQ.
+ [!MUTEX_HINT_REL]: Define MUTEX_HINT_REL.
+ (__arch_compare_and_exchange_val_32_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_compare_and_exchange_val_32_rel): Add MUTEX_HINT_REL to lwarx.
+ (__arch_atomic_exchange_val_32_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_atomic_exchange_rel_32_rel): Add MUTEX_HINT_REL to lwarx.
+ * sysdeps/powerpc/powerpc32/bits/atomic.h [_ARCH_PWR6 || _ARCH_PWR6X]:
+ Define MUTEX_HINT_ACQ as ",1" and MUTEX_HINT_REL as ",0".
+ (__arch_compare_and_exchange_bool_32_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_compare_and_exchange_bool_32_rel): Add MUTEX_HINT_REL to lwarx.
+ * sysdeps/powerpc/powerpc64/bits/atomic.h [_ARCH_PWR6 || _ARCH_PWR6D]:
+ Define MUTEX_HINT_ACQ as ",1" and MUTEX_HINT_REL as ",0".
+ (__arch_compare_and_exchange_bool_32_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_compare_and_exchange_bool_32_rel): Add MUTEX_HINT_REL to lwarx.
+ (__arch_compare_and_exchange_bool_64_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_compare_and_exchange_bool_64_rel): Add MUTEX_HINT_REL to lwarx.
+ (__arch_compare_and_exchange_val_64_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_compare_and_exchange_val_64_rel): Add MUTEX_HINT_REL to lwarx.
+ (__arch_atomic_exchange_val_64_acq): Add MUTEX_HINT_ACQ to lwarx.
+ (__arch_atomic_exchange_rel_64_rel): Add MUTEX_HINT_REL to lwarx.
+
+2007-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/libc-start.c
+ (__cache_line_size): Define the variable here. Add
+ attribute_hidden, remove weak_extern.
+ (__libc_start_main): Set __cache_line_size
+ unconditionally.
+ * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+ (__cache_line_size): Define the variable here. Add
+ attribute_hidden, remove weak_extern.
+ (DL_PLATFORM_AUXV): Set __cache_line_size
+ unconditionally.
+ * sysdeps/powerpc/powerpc32/dl-machine.c (__cache_line_size): Remove
+ weak_extern, add attribute_hidden.
+ (__elf_machine_runtime_setup): Assume __cache_line_size is always
+ defined in ld.so.
+ * sysdeps/powerpc/powerpc32/memset.S (__cache_line_size): Remove
+ definition.
+ * sysdeps/powerpc/powerpc64/memset.S (__cache_line_size): Likewise.
+
+2007-03-26 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #4276]
+ * timezone/africa: Update from tzdata2007d.
+ * timezone/asia: Likewise.
+ * timezone/australasia: Likewise.
+ * timezone/backward: Likewise.
+ * timezone/europe: Likewise.
+ * timezone/iso3166.tab: Likewise.
+ * timezone/leapseconds: Likewise.
+ * timezone/northamerica: Likewise.
+ * timezone/southamerica: Likewise.
+ * timezone/zone.tab: Likewise.
+
+ * timezone/private.h: Update from tzcode2007d.
+ * timezone/zdump.c: Likewise.
+ * timezone/zic.c: Likewise.
+
+2007-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ * nis/nis_call.c: Include bits/libc-lock.h, sys/stat.h, unistd.h.
+ (nis_server_cache, nis_server_cache_lock, nis_cold_start_mtime): New
+ variables.
+ (nis_server_cache_search, nis_server_cache_add): New functions.
+ (__nisfind_server): Use them. Add dbp and flags argument, if
+ call __nisbind_create.
+ (__nisbind_create): Add server_used and current_ep arguments,
+ only call __nis_findfastest if server_used is ~0.
+ (__do_niscall2, __prepare_niscall): Adjust callers.
+ (ckey_cache, ckey_cache_size, ckey_cache_allocated, ckey_cache_pid,
+ ckey_cache_euid, ckey_cache_lock): New variables.
+ (get_ckey): New function.
+ (__nisbind_connect): If not dbp->use_udp, pass IPPROTO_TCP to
+ __pmap_getnisport. Save __pmap_getnisport result in
+ dbp->addr.sin_port if non-zero. Use get_ckey to create conversation
+ key.
+ * nis/nis_lookup.c (nis_lookup): Likewise.
+ * nis/nis_table.c (nis_list): Likewise.
+ * nis/rpcsvc/nislib.h (__nisbind_create, __nisfind_server): Adjust
+ prototypes.
+
+ * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_getpwnam_r,
+ _nss_nisplus_getpwuid_r): Pass USE_DGRAM flag to nis_list.
+ * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_getservbyname_r,
+ _nss_nisplus_getservbyport_r): Likewise.
+ * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyname_r,
+ _nss_nisplus_getnetbyaddr_r): Likewise.
+ * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_getspnam_r): Likewise.
+ * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r,
+ _nss_nisplus_getntohost_r): Likewise.
+ * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_getrpcbyname_r,
+ _nss_nisplus_getrpcbynumber_r): Likewise.
+
+2007-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in (libc_cv_gnu89_inline): Only do compile test.
+ * configure: Rebuilt.
+
+ * soft-fp/double.h (_FP_UNION_D): Use _FP_W_TYPE for frac
+ bit-fields.
+ * soft-fp/extended.h (_FP_UNION_E): Likewise.
+
+2006-06-07 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #2831]
+ * soft-fp/quad.h (_FP_UNION_Q): Use _FP_W_TYPE for frac
+ bit-fields.
+
+2007-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * nscd/gai.c: Include alloca.h.
+ (__libc_use_alloca): Define.
+
2007-03-16 Jakub Jelinek <jakub@redhat.com>
* elf/dl-open.c (dl_open_worker): Declare l in 2 different
diff --git a/config.h.in b/config.h.in
index a46e405269..b5abb10187 100644
--- a/config.h.in
+++ b/config.h.in
@@ -19,6 +19,9 @@
/* Defined if building with SELinux support & audit libs are detected. */
#undef HAVE_LIBAUDIT
+/* Defined if building with SELinux support & libcap libs are detected. */
+#undef HAVE_LIBCAP
+
/* Define if using XCOFF. Set by --with-xcoff. */
#undef HAVE_XCOFF
diff --git a/configure b/configure
index dbdf0d5d67..177653f813 100755
--- a/configure
+++ b/configure
@@ -5972,8 +5972,8 @@ main () { return 0;}
#error
#endif
EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -std=gnu99 -fgnu89-inline
- -o conftest conftest.c 1>&5'
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -std=gnu99 -fgnu89-inline
+ -o conftest.s conftest.c 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
diff --git a/configure.in b/configure.in
index baf37598b2..a9274a8dd6 100644
--- a/configure.in
+++ b/configure.in
@@ -1650,8 +1650,8 @@ main () { return 0;}
#error
#endif
EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -std=gnu99 -fgnu89-inline
- -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -std=gnu99 -fgnu89-inline
+ -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD])
then
libc_cv_gnu89_inline=yes
else
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 00dde6b7c7..46bd255f2b 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-fc7
-fedora-sync-date := 2007-03-17 21:30 UTC
-fedora-sync-tag := fedora-glibc-20070317T2130
+fedora-sync-date := 2007-03-31 16:09 UTC
+fedora-sync-tag := fedora-glibc-20070331T1609
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index 80d71e4d8d..779c17e370 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 19
+%define glibcrelease 20
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
@@ -1062,6 +1062,9 @@ ln -f ${RPM_BUILD_ROOT}%{_sbindir}/iconvconfig{,.%{_target_cpu}}
rm -f $RPM_BUILD_ROOT/etc/gai.conf
+# In F7+ this is provided by rpcbind rpm
+rm -f $RPM_BUILD_ROOT%{_sbindir}/rpcinfo
+
# BUILD THE FILE LIST
find $RPM_BUILD_ROOT -type f -or -type l |
sed -e 's|.*/etc|%config &|' \
@@ -1546,6 +1549,11 @@ rm -f *.filelist*
%endif
%changelog
+* Sat Mar 31 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-20
+- assorted NIS+ speedups (#223467)
+- fix HAVE_LIBCAP configure detection (#178934)
+- remove %{_prefix}/sbin/rpcinfo from glibc-common (#228894)
+
* Sat Mar 17 2007 Jakub Jelinek <jakub@redhat.com> 2.5.90-19
- fix power6 libm compat symbols on ppc32 (#232633)
- fix child refcntr in NPTL fork (#230198)
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 928053daf5..32d47f8b84 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2001,2004,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -25,8 +26,11 @@
#include <rpc/auth.h>
#include <rpcsvc/nis.h>
#include <sys/socket.h>
+#include <sys/stat.h>
+#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <bits/libc-lock.h>
#include "nis_xdr.h"
#include "nis_intern.h"
@@ -107,10 +111,79 @@ __nisbind_next (dir_binding *bind)
}
libnsl_hidden_def (__nisbind_next)
+static struct ckey_cache_entry
+{
+ struct in_addr inaddr;
+ in_port_t port;
+ unsigned int protocol;
+ des_block ckey;
+} *ckey_cache;
+static size_t ckey_cache_size;
+static size_t ckey_cache_allocated;
+static pid_t ckey_cache_pid;
+static uid_t ckey_cache_euid;
+__libc_lock_define_initialized (static, ckey_cache_lock)
+
+static bool_t
+get_ckey (des_block *ckey, struct sockaddr_in *addr, unsigned int protocol)
+{
+ size_t i;
+ pid_t pid = getpid ();
+ uid_t euid = geteuid ();
+ bool_t ret = FALSE;
+
+ __libc_lock_lock (ckey_cache_lock);
+
+ if (ckey_cache_pid != pid || ckey_cache_euid != euid)
+ {
+ ckey_cache_size = 0;
+ ckey_cache_pid = pid;
+ ckey_cache_euid = euid;
+ }
+
+ for (i = 0; i < ckey_cache_size; ++i)
+ if (ckey_cache[i].port == addr->sin_port
+ && ckey_cache[i].protocol == protocol
+ && memcmp (&ckey_cache[i].inaddr, &addr->sin_addr,
+ sizeof (addr->sin_addr)) == 0)
+ {
+ *ckey = ckey_cache[i].ckey;
+ ret = TRUE;
+ break;
+ }
+
+ if (!ret && key_gendes (ckey) >= 0)
+ {
+ ret = TRUE;
+ /* Don't grow the cache indefinitely. */
+ if (ckey_cache_size == 256)
+ ckey_cache_size = 0;
+ if (ckey_cache_size == ckey_cache_allocated)
+ {
+ size_t size = ckey_cache_allocated ? ckey_cache_allocated * 2 : 16;
+ struct ckey_cache_entry *new_cache
+ = realloc (ckey_cache, size * sizeof (*ckey_cache));
+ if (new_cache != NULL)
+ {
+ ckey_cache = new_cache;
+ ckey_cache_allocated = size;
+ }
+ }
+ ckey_cache[ckey_cache_size].inaddr = addr->sin_addr;
+ ckey_cache[ckey_cache_size].port = addr->sin_port;
+ ckey_cache[ckey_cache_size].protocol = protocol;
+ ckey_cache[ckey_cache_size++].ckey = *ckey;
+ }
+
+ __libc_lock_unlock (ckey_cache_lock);
+ return ret;
+}
+
nis_error
__nisbind_connect (dir_binding *dbp)
{
nis_server *serv;
+ u_short port;
if (dbp == NULL)
return NIS_FAIL;
@@ -128,9 +201,12 @@ __nisbind_connect (dir_binding *dbp)
/* Check, if the host is online and rpc.nisd is running. Much faster
then the clnt*_create functions: */
- if (__pmap_getnisport (&dbp->addr, NIS_PROG, NIS_VERSION, IPPROTO_UDP) == 0)
+ port = __pmap_getnisport (&dbp->addr, NIS_PROG, NIS_VERSION,
+ dbp->use_udp ? IPPROTO_UDP : IPPROTO_TCP);
+ if (port == 0)
return NIS_RPCERROR;
+ dbp->addr.sin_port = htons (port);
dbp->socket = RPC_ANYSOCK;
if (dbp->use_udp)
dbp->clnt = clntudp_create (&dbp->addr, NIS_PROG, NIS_VERSION,
@@ -153,17 +229,16 @@ __nisbind_connect (dir_binding *dbp)
{
char netname[MAXNETNAMELEN + 1];
char *p;
+ des_block ckey;
- p = stpcpy (netname, "unix.");
+ p = stpcpy (netname, "unix@");
strncpy (p, serv->name, MAXNETNAMELEN - 5);
netname[MAXNETNAMELEN] = '\0';
- // XXX What is this supposed to do? If we really want to replace
- // XXX the first dot, then we might as well use unix@ as the
- // XXX prefix string. --drepper
- p = strchr (netname, '.');
- *p = '@';
- dbp->clnt->cl_auth =
- authdes_pk_create (netname, &serv->pkey, 300, NULL, NULL);
+ dbp->clnt->cl_auth = NULL;
+ if (get_ckey (&ckey, &dbp->addr,
+ dbp->use_udp ? IPPROTO_UDP : IPPROTO_TCP))
+ dbp->clnt->cl_auth =
+ authdes_pk_create (netname, &serv->pkey, 300, NULL, &ckey);
if (!dbp->clnt->cl_auth)
dbp->clnt->cl_auth = authunix_create_default ();
}
@@ -177,7 +252,8 @@ libnsl_hidden_def (__nisbind_connect)
nis_error
__nisbind_create (dir_binding *dbp, const nis_server *serv_val,
- unsigned int serv_len, unsigned int flags)
+ unsigned int serv_len, unsigned int server_used,
+ unsigned int current_ep, unsigned int flags)
{
dbp->clnt = NULL;
@@ -203,8 +279,16 @@ __nisbind_create (dir_binding *dbp, const nis_server *serv_val,
dbp->trys = 1;
dbp->class = -1;
- if (__nis_findfastest (dbp) < 1)
- return NIS_NAMEUNREACHABLE;
+ if (server_used == ~0)
+ {
+ if (__nis_findfastest (dbp) < 1)
+ return NIS_NAMEUNREACHABLE;
+ }
+ else
+ {
+ dbp->server_used = server_used;
+ dbp->current_ep = current_ep;
+ }
return NIS_SUCCESS;
}
@@ -306,7 +390,7 @@ __do_niscall2 (const nis_server *server, u_int server_len, u_long prog,
if (flags & MASTER_ONLY)
server_len = 1;
- status = __nisbind_create (&dbp, server, server_len, flags);
+ status = __nisbind_create (&dbp, server, server_len, ~0, ~0, flags);
if (status != NIS_SUCCESS)
return status;
@@ -499,42 +583,221 @@ first_shoot (const_nis_name name, int search_parent_first, directory_obj *dir)
return obj;
}
+static struct nis_server_cache
+{
+ int search_parent_first;
+ int uses;
+ unsigned int size;
+ unsigned int server_used;
+ unsigned int current_ep;
+ time_t expires;
+ char name[];
+} *nis_server_cache[16];
+static time_t nis_cold_start_mtime;
+__libc_lock_define_initialized (static, nis_server_cache_lock)
+
+static directory_obj *
+nis_server_cache_search (const_nis_name name, int search_parent_first,
+ unsigned int *server_used, unsigned int *current_ep,
+ struct timeval *now)
+{
+ directory_obj *ret = NULL;
+ int i;
+ char *addr;
+ XDR xdrs;
+ struct stat64 st;
+
+ if (stat64 ("/var/nis/NIS_COLD_START", &st) < 0)
+ st.st_mtime = nis_cold_start_mtime + 1;
+
+ __libc_lock_lock (nis_server_cache_lock);
+
+ for (i = 0; i < 16; ++i)
+ if (nis_server_cache[i] == NULL)
+ continue;
+ else if (st.st_mtime != nis_cold_start_mtime
+ || now->tv_sec > nis_server_cache[i]->expires)
+ {
+ free (nis_server_cache[i]);
+ nis_server_cache[i] = NULL;
+ }
+ else if (nis_server_cache[i]->search_parent_first == search_parent_first
+ && strcmp (nis_server_cache[i]->name, name) == 0)
+ {
+ ret = calloc (1, sizeof (directory_obj));
+ if (ret == NULL)
+ break;
+
+ addr = rawmemchr (nis_server_cache[i]->name, '\0') + 8;
+ addr = (char *) ((uintptr_t) addr & ~(uintptr_t) 7);
+ xdrmem_create (&xdrs, addr, nis_server_cache[i]->size, XDR_DECODE);
+ if (!_xdr_directory_obj (&xdrs, ret))
+ {
+ xdr_destroy (&xdrs);
+ free (ret);
+ ret = NULL;
+ free (nis_server_cache[i]);
+ nis_server_cache[i] = NULL;
+ break;
+ }
+ xdr_destroy (&xdrs);
+ *server_used = nis_server_cache[i]->server_used;
+ *current_ep = nis_server_cache[i]->current_ep;
+ break;
+ }
+
+ nis_cold_start_mtime = st.st_mtime;
+
+ __libc_lock_unlock (nis_server_cache_lock);
+ return ret;
+}
+
+static void
+nis_server_cache_add (const_nis_name name, int search_parent_first,
+ directory_obj *dir, unsigned int server_used,
+ unsigned int current_ep, struct timeval *now)
+{
+ struct nis_server_cache **loc;
+ struct nis_server_cache *new;
+ struct nis_server_cache *old;
+ int i;
+ char *addr;
+ unsigned int size;
+ XDR xdrs;
+
+ if (dir == NULL)
+ return;
+
+ size = xdr_sizeof ((xdrproc_t) _xdr_directory_obj, (char *) dir);
+ new = calloc (1, sizeof (*new) + strlen (name) + 8 + size);
+ if (new == NULL)
+ return;
+ new->search_parent_first = search_parent_first;
+ new->uses = 1;
+ new->expires = now->tv_sec + dir->do_ttl;
+ new->size = size;
+ new->server_used = server_used;
+ new->current_ep = current_ep;
+ addr = stpcpy (new->name, name) + 8;
+ addr = (char *) ((uintptr_t) addr & ~(uintptr_t) 7);
+
+ xdrmem_create(&xdrs, addr, size, XDR_ENCODE);
+ if (!_xdr_directory_obj (&xdrs, dir))
+ {
+ xdr_destroy (&xdrs);
+ free (new);
+ return;
+ }
+ xdr_destroy (&xdrs);
+
+ __libc_lock_lock (nis_server_cache_lock);
+
+ /* Choose which entry should be evicted from the cache. */
+ loc = &nis_server_cache[0];
+ if (*loc != NULL)
+ for (i = 1; i < 16; ++i)
+ if (nis_server_cache[i] == NULL)
+ {
+ loc = &nis_server_cache[i];
+ break;
+ }
+ else if ((*loc)->uses > nis_server_cache[i]->uses
+ || ((*loc)->uses == nis_server_cache[i]->uses
+ && (*loc)->expires > nis_server_cache[i]->expires))
+ loc = &nis_server_cache[i];
+ old = *loc;
+ *loc = new;
+
+ __libc_lock_unlock (nis_server_cache_lock);
+ free (old);
+}
+
nis_error
__nisfind_server (const_nis_name name, int search_parent_first,
- directory_obj **dir)
+ directory_obj **dir, dir_binding *dbp, unsigned int flags)
{
+ nis_error result = NIS_SUCCESS;
+ nis_error status;
+ directory_obj *obj;
+ struct timeval now;
+ unsigned int server_used = ~0;
+ unsigned int current_ep = ~0;
+
if (name == NULL)
return NIS_BADNAME;
-#if 0
- /* Search in local cache. In the moment, we ignore the fastest server */
- if (!(flags & NO_CACHE))
- dir = __nis_cache_search (name, flags, &cinfo);
-#endif
+ if (*dir != NULL)
+ return NIS_SUCCESS;
- nis_error result = NIS_SUCCESS;
- if (*dir == NULL)
+ (void) gettimeofday (&now, NULL);
+
+ if ((flags & NO_CACHE) == 0)
+ *dir = nis_server_cache_search (name, search_parent_first, &server_used,
+ &current_ep, &now);
+ if (*dir != NULL)
{
- nis_error status;
- directory_obj *obj;
+ unsigned int server_len = (*dir)->do_servers.do_servers_len;
+ if (flags & MASTER_ONLY)
+ {
+ server_len = 1;
+ if (server_used != 0)
+ {
+ server_used = ~0;
+ current_ep = ~0;
+ }
+ }
+ result = __nisbind_create (dbp, (*dir)->do_servers.do_servers_val,
+ server_len, server_used, current_ep, flags);
+ if (result != NIS_SUCCESS)
+ {
+ nis_free_directory (*dir);
+ *dir = NULL;
+ }
+ return result;
+ }
- *dir = readColdStartFile ();
- if (*dir == NULL)
- /* No /var/nis/NIS_COLD_START->no NIS+ installed. */
- return NIS_UNAVAIL;
+ *dir = readColdStartFile ();
+ if (*dir == NULL)
+ /* No /var/nis/NIS_COLD_START->no NIS+ installed. */
+ return NIS_UNAVAIL;
- /* Try at first, if servers in "dir" know our object */
- obj = first_shoot (name, search_parent_first, *dir);
+ /* Try at first, if servers in "dir" know our object */
+ obj = first_shoot (name, search_parent_first, *dir);
+ if (obj == NULL)
+ {
+ obj = rec_dirsearch (name, *dir, &status);
if (obj == NULL)
+ result = status;
+ }
+
+ if (result == NIS_SUCCESS)
+ {
+ unsigned int server_len = (*dir)->do_servers.do_servers_len;
+ if (flags & MASTER_ONLY)
+ server_len = 1;
+ result = __nisbind_create (dbp, (*dir)->do_servers.do_servers_val,
+ server_len, ~0, ~0, flags);
+ if (result == NIS_SUCCESS)
{
- obj = rec_dirsearch (name, *dir, &status);
- if (obj == NULL)
- result = status;
+ if ((flags & MASTER_ONLY) == 0
+ || (*dir)->do_servers.do_servers_len == 1)
+ {
+ server_used = dbp->server_used;
+ current_ep = dbp->current_ep;
+ }
+ if ((flags & NO_CACHE) == 0)
+ nis_server_cache_add (name, search_parent_first, obj,
+ server_used, current_ep, &now);
+ }
+ else
+ {
+ nis_free_directory (obj);
+ obj = NULL;
}
-
- *dir = obj;
}
+ *dir = obj;
+
return result;
}
@@ -543,38 +806,19 @@ nis_error
__prepare_niscall (const_nis_name name, directory_obj **dirp,
dir_binding *bptrp, unsigned int flags)
{
- nis_error retcode = __nisfind_server (name, 1, dirp);
+ nis_error retcode = __nisfind_server (name, 1, dirp, bptrp, flags);
if (__builtin_expect (retcode != NIS_SUCCESS, 0))
return retcode;
- nis_server *server;
- u_int server_len;
-
- if (flags & MASTER_ONLY)
- {
- server = (*dirp)->do_servers.do_servers_val;
- server_len = 1;
- }
- else
- {
- server = (*dirp)->do_servers.do_servers_val;
- server_len = (*dirp)->do_servers.do_servers_len;
- }
-
- retcode = __nisbind_create (bptrp, server, server_len, flags);
- if (retcode == NIS_SUCCESS)
- {
- do
- if (__nisbind_connect (bptrp) == NIS_SUCCESS)
- return NIS_SUCCESS;
- while (__nisbind_next (bptrp) == NIS_SUCCESS);
-
- __nisbind_destroy (bptrp);
- memset (bptrp, '\0', sizeof (*bptrp));
+ do
+ if (__nisbind_connect (bptrp) == NIS_SUCCESS)
+ return NIS_SUCCESS;
+ while (__nisbind_next (bptrp) == NIS_SUCCESS);
- retcode = NIS_NAMEUNREACHABLE;
- }
+ __nisbind_destroy (bptrp);
+ memset (bptrp, '\0', sizeof (*bptrp));
+ retcode = NIS_NAMEUNREACHABLE;
nis_free_directory (*dirp);
*dirp = NULL;
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c
index 839ee4ee42..2075caa009 100644
--- a/nis/nis_lookup.c
+++ b/nis/nis_lookup.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-1999, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997-1999, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1997.
@@ -127,18 +128,10 @@ nis_lookup (const_nis_name name, const unsigned int flags)
/* Otherwise __nisfind_server will not do anything. */
dir = NULL;
- if (__nisfind_server (req.ns_name, 1, &dir)
+ if (__nisfind_server (req.ns_name, 1, &dir, &bptr,
+ flags & ~MASTER_ONLY)
!= NIS_SUCCESS)
goto out;
-
- if (__nisbind_create (&bptr,
- dir->do_servers.do_servers_val,
- dir->do_servers.do_servers_len,
- flags) != NIS_SUCCESS)
- {
- nis_free_directory (dir);
- goto out;
- }
}
else
if (__nisbind_next (&bptr) != NIS_SUCCESS)
diff --git a/nis/nis_table.c b/nis/nis_table.c
index cb25be61e2..70b4701419 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -1,4 +1,5 @@
-/* Copyright (c) 1997-1999,2003,2004,2005,2006 Free Software Foundation, Inc.
+/* Copyright (c) 1997-1999, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -274,21 +275,14 @@ nis_list (const_nis_name name, unsigned int flags,
memset (res, '\0', sizeof (nis_result));
status = __nisfind_server (ibreq->ibr_name,
- ibreq->ibr_srch.ibr_srch_val != NULL, &dir);
+ ibreq->ibr_srch.ibr_srch_val != NULL,
+ &dir, &bptr, flags & ~MASTER_ONLY);
if (status != NIS_SUCCESS)
{
NIS_RES_STATUS (res) = status;
goto fail3;
}
- status = __nisbind_create (&bptr, dir->do_servers.do_servers_val,
- dir->do_servers.do_servers_len, flags);
- if (__builtin_expect (status != NIS_SUCCESS, 0))
- {
- NIS_RES_STATUS (res) = status;
- goto fail2;
- }
-
while (__nisbind_connect (&bptr) != NIS_SUCCESS)
if (__builtin_expect (__nisbind_next (&bptr) != NIS_SUCCESS, 0))
{
@@ -338,7 +332,6 @@ nis_list (const_nis_name name, unsigned int flags,
NIS_RES_STATUS (res) = NIS_NOMEMORY;
fail:
__nisbind_destroy (&bptr);
- fail2:
nis_free_directory (dir);
fail3:
free (tablepath);
diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c
index 8d69ad9373..298869f931 100644
--- a/nis/nss_nisplus/nisplus-ethers.c
+++ b/nis/nss_nisplus/nisplus-ethers.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -256,7 +257,8 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
if (result == NULL)
{
@@ -322,7 +324,8 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr, struct etherent *eth,
addr->ether_addr_octet[4], addr->ether_addr_octet[5],
tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
if (result == NULL)
{
diff --git a/nis/nss_nisplus/nisplus-network.c b/nis/nss_nisplus/nisplus-network.c
index 286a4ccbdc..1cf652f071 100644
--- a/nis/nss_nisplus/nisplus-network.c
+++ b/nis/nss_nisplus/nisplus-network.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000-2003,2005,2006,2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -338,7 +339,7 @@ _nss_nisplus_getnetbyname_r (const char *name, struct netent *network,
/* Search at first in the alias list, and use the correct name
for the next search */
snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val);
- result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
+ result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM, NULL, NULL);
if (result != NULL)
{
@@ -366,7 +367,8 @@ _nss_nisplus_getnetbyname_r (const char *name, struct netent *network,
}
nis_freeresult (result);
- result = nis_list (bufptr, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
+ result = nis_list (bufptr, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM,
+ NULL, NULL);
}
if (result == NULL)
@@ -438,7 +440,8 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type,
while (1)
{
snprintf (buf, sizeof (buf), "[addr=%s],%s", buf2, tablename_val);
- nis_result *result = nis_list (buf, EXPAND_NAME, NULL, NULL);
+ nis_result *result = nis_list (buf, EXPAND_NAME | USE_DGRAM,
+ NULL, NULL);
if (result == NULL)
{
diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c
index 93e37dddab..cd33aebbcc 100644
--- a/nis/nss_nisplus/nisplus-pwd.c
+++ b/nis/nss_nisplus/nisplus-pwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006
+/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -311,7 +311,7 @@ _nss_nisplus_getpwnam_r (const char *name, struct passwd *pw,
snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val);
- result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL);
if (result == NULL)
{
@@ -370,7 +370,7 @@ _nss_nisplus_getpwuid_r (const uid_t uid, struct passwd *pw,
snprintf (buf, sizeof (buf), "[uid=%lu],%s",
(unsigned long int) uid, pwd_tablename_val);
- result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL);
if (result == NULL)
{
diff --git a/nis/nss_nisplus/nisplus-rpc.c b/nis/nss_nisplus/nisplus-rpc.c
index 5875bbe98d..711c6bc273 100644
--- a/nis/nss_nisplus/nisplus-rpc.c
+++ b/nis/nss_nisplus/nisplus-rpc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006
+/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -315,7 +315,8 @@ _nss_nisplus_getrpcbyname_r (const char *name, struct rpcent *rpc,
/* Search at first in the alias list, and use the correct name
for the next search */
snprintf (buf, sizeof (buf), "[name=%s],%s", name, tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
if (result != NULL)
{
@@ -342,7 +343,8 @@ _nss_nisplus_getrpcbyname_r (const char *name, struct rpcent *rpc,
}
nis_freeresult (result);
- result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS , NULL, NULL);
+ result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
}
if (result == NULL)
@@ -402,7 +404,8 @@ _nss_nisplus_getrpcbynumber_r (const int number, struct rpcent *rpc,
snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH | USE_DGRAM,
+ NULL, NULL);
if (result == NULL)
{
diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c
index 51c1956e2f..607ce80b01 100644
--- a/nis/nss_nisplus/nisplus-service.c
+++ b/nis/nss_nisplus/nisplus-service.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006
+/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -322,7 +322,8 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol,
for the next search */
snprintf (buf, sizeof (buf), "[name=%s,proto=%s],%s", name, protocol,
tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
if (result != NULL)
{
@@ -351,7 +352,8 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol,
}
nis_freeresult (result);
- result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ result = nis_list (bufptr, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
}
if (result == NULL)
@@ -420,7 +422,8 @@ _nss_nisplus_getservbyport_r (const int number, const char *protocol,
snprintf (buf, sizeof (buf), "[port=%d,proto=%s],%s",
number, protocol, tablename_val);
- nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ nis_result *result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM,
+ NULL, NULL);
if (result == NULL)
{
diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c
index e63e1eeaec..f256f3eb90 100644
--- a/nis/nss_nisplus/nisplus-spwd.c
+++ b/nis/nss_nisplus/nisplus-spwd.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -182,7 +183,7 @@ _nss_nisplus_getspnam_r (const char *name, struct spwd *sp,
snprintf (buf, sizeof (buf), "[name=%s],%s", name, pwd_tablename_val);
- result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
+ result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS | USE_DGRAM, NULL, NULL);
if (result == NULL)
{
diff --git a/nis/rpcsvc/nislib.h b/nis/rpcsvc/nislib.h
index c993bac5e8..c8927ece17 100644
--- a/nis/rpcsvc/nislib.h
+++ b/nis/rpcsvc/nislib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -272,12 +272,13 @@ struct dir_binding
typedef struct dir_binding dir_binding;
extern nis_error __nisbind_create (dir_binding *, const nis_server *,
- unsigned int, unsigned int) __THROW;
+ unsigned int, unsigned int, unsigned int,
+ unsigned int) __THROW;
extern nis_error __nisbind_connect (dir_binding *) __THROW;
extern nis_error __nisbind_next (dir_binding *) __THROW;
extern void __nisbind_destroy (dir_binding *) __THROW;
-extern nis_error __nisfind_server (const_nis_name, int, directory_obj **)
- __THROW;
+extern nis_error __nisfind_server (const_nis_name, int, directory_obj **,
+ dir_binding *, unsigned int) __THROW;
#endif
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 38dd8d0510..eb35a94cc8 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+ (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
+
2007-03-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
index 0136b97595..239f4ddf55 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
@@ -25,7 +25,6 @@
#include <bits/pthreadtypes.h>
#include <atomic.h>
-
#ifndef __NR_futex
# define __NR_futex 221
#endif
@@ -133,7 +132,7 @@
/* Set *futex to ID if it is 0, atomically. Returns the old value */
#define __lll_robust_trylock(futex, id) \
({ int __val; \
- __asm __volatile ("1: lwarx %0,0,%2\n" \
+ __asm __volatile ("1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
" cmpwi 0,%0,0\n" \
" bne 2f\n" \
" stwcx. %3,0,%2\n" \
diff --git a/nscd/gai.c b/nscd/gai.c
index 46f8b8bec9..1233590407 100644
--- a/nscd/gai.c
+++ b/nscd/gai.c
@@ -15,6 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include <alloca.h>
/* This file uses the getaddrinfo code but it compiles it without NSCD
support. We just need a few symbol renames. */
#define __inet_aton inet_aton
@@ -25,6 +26,8 @@
#define __sendto sendto
#define __strchrnul strchrnul
#define __getline getline
+/* nscd uses 1MB or 2MB thread stacks. */
+#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
#include <getaddrinfo.c>
diff --git a/nscd/selinux.c b/nscd/selinux.c
index 4a462223f5..f2dbceeea1 100644
--- a/nscd/selinux.c
+++ b/nscd/selinux.c
@@ -187,18 +187,22 @@ preserve_capabilities (void)
if (tmp_caps == NULL || new_caps == NULL)
{
if (tmp_caps != NULL)
- free_caps (tmp_caps);
+ cap_free (tmp_caps);
dbg_log (_("Failed to initialize drop of capabilities"));
error (EXIT_FAILURE, 0, _("cap_init failed"));
}
/* There is no reason why these should not work. */
- cap_set_flag (new_caps, CAP_PERMITTED, nnew_cap_list, new_cap_list, CAP_SET);
- cap_set_flag (new_caps, CAP_EFFECTIVE, nnew_cap_list, new_cap_list, CAP_SET);
-
- cap_set_flag (tmp_caps, CAP_PERMITTED, ntmp_cap_list, tmp_cap_list, CAP_SET);
- cap_set_flag (tmp_caps, CAP_EFFECTIVE, ntmp_cap_list, tmp_cap_list, CAP_SET);
+ cap_set_flag (new_caps, CAP_PERMITTED, nnew_cap_list,
+ (cap_value_t *) new_cap_list, CAP_SET);
+ cap_set_flag (new_caps, CAP_EFFECTIVE, nnew_cap_list,
+ (cap_value_t *) new_cap_list, CAP_SET);
+
+ cap_set_flag (tmp_caps, CAP_PERMITTED, ntmp_cap_list,
+ (cap_value_t *) tmp_cap_list, CAP_SET);
+ cap_set_flag (tmp_caps, CAP_EFFECTIVE, ntmp_cap_list,
+ (cap_value_t *) tmp_cap_list, CAP_SET);
int res = cap_set_proc (tmp_caps);
diff --git a/nscd/selinux.h b/nscd/selinux.h
index 9ce0628486..27afcd6e86 100644
--- a/nscd/selinux.h
+++ b/nscd/selinux.h
@@ -1,5 +1,5 @@
/* Header for nscd SELinux access controls.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Matthew Rickard <mjricka@epoch.ncsc.mil>, 2004.
@@ -23,7 +23,7 @@
#include "nscd.h"
#ifdef HAVE_LIBCAP
-# include <sys/capabilities.h>
+# include <sys/capability.h>
#endif
#ifdef HAVE_SELINUX
diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
index c2d6ba4a08..a945ffb997 100755
--- a/scripts/check-local-headers.sh
+++ b/scripts/check-local-headers.sh
@@ -30,6 +30,7 @@ if fgrep "$includedir" */*.{o,os,oS}.d |
fgrep -v "$includedir/asm" |
fgrep -v "$includedir/linux" |
fgrep -v "$includedir/selinux" |
+fgrep -v "$includedir/sys/capability.h" |
fgrep -v "$includedir/gd"; then
# If we found a match something is wrong.
exit 1
diff --git a/soft-fp/double.h b/soft-fp/double.h
index c8f4420af8..b012d9d51b 100644
--- a/soft-fp/double.h
+++ b/soft-fp/double.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Double Precision
- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
@@ -168,13 +168,13 @@ union _FP_UNION_D
DFtype flt;
struct {
#if __BYTE_ORDER == __BIG_ENDIAN
- unsigned sign : 1;
- unsigned exp : _FP_EXPBITS_D;
- unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
+ unsigned sign : 1;
+ unsigned exp : _FP_EXPBITS_D;
+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
#else
- unsigned long frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
- unsigned exp : _FP_EXPBITS_D;
- unsigned sign : 1;
+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0);
+ unsigned exp : _FP_EXPBITS_D;
+ unsigned sign : 1;
#endif
} bits __attribute__((packed));
};
diff --git a/soft-fp/extended.h b/soft-fp/extended.h
index bbf39429e7..0e2a90c084 100644
--- a/soft-fp/extended.h
+++ b/soft-fp/extended.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Extended Precision.
- Copyright (C) 1999,2006 Free Software Foundation, Inc.
+ Copyright (C) 1999,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
@@ -277,14 +277,14 @@ union _FP_UNION_E
XFtype flt;
struct {
#if __BYTE_ORDER == __BIG_ENDIAN
- unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
- unsigned sign : 1;
- unsigned exp : _FP_EXPBITS_E;
- unsigned long frac : _FP_W_TYPE_SIZE;
+ _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
+ unsigned sign : 1;
+ unsigned exp : _FP_EXPBITS_E;
+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
#else
- unsigned long frac : _FP_W_TYPE_SIZE;
- unsigned exp : _FP_EXPBITS_E;
- unsigned sign : 1;
+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
+ unsigned exp : _FP_EXPBITS_E;
+ unsigned sign : 1;
#endif
} bits;
};
diff --git a/soft-fp/quad.h b/soft-fp/quad.h
index d7840ff066..c22e944029 100644
--- a/soft-fp/quad.h
+++ b/soft-fp/quad.h
@@ -1,6 +1,6 @@
/* Software floating-point emulation.
Definitions for IEEE Quad Precision.
- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com),
Jakub Jelinek (jj@ultra.linux.cz),
@@ -176,15 +176,15 @@ union _FP_UNION_Q
} longs;
struct {
#if __BYTE_ORDER == __BIG_ENDIAN
- unsigned sign : 1;
- unsigned exp : _FP_EXPBITS_Q;
- unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
- unsigned long frac0 : _FP_W_TYPE_SIZE;
+ unsigned sign : 1;
+ unsigned exp : _FP_EXPBITS_Q;
+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
#else
- unsigned long frac0 : _FP_W_TYPE_SIZE;
- unsigned long frac1 : _FP_FRACBITS_Q-(_FP_IMPLBIT_Q != 0)-_FP_W_TYPE_SIZE;
- unsigned exp : _FP_EXPBITS_Q;
- unsigned sign : 1;
+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE;
+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE;
+ unsigned exp : _FP_EXPBITS_Q;
+ unsigned sign : 1;
#endif
} bits;
};
diff --git a/sysdeps/powerpc/bits/atomic.h b/sysdeps/powerpc/bits/atomic.h
index 31f27e9e10..d71f64e0ac 100644
--- a/sysdeps/powerpc/bits/atomic.h
+++ b/sysdeps/powerpc/bits/atomic.h
@@ -70,6 +70,13 @@ typedef uintmax_t uatomic_max_t;
# endif
#endif
+#ifndef MUTEX_HINT_ACQ
+# define MUTEX_HINT_ACQ
+#endif
+#ifndef MUTEX_HINT_REL
+# define MUTEX_HINT_REL
+#endif
+
#define atomic_full_barrier() __asm ("sync" ::: "memory")
#define atomic_write_barrier() __asm ("eieio" ::: "memory")
@@ -78,7 +85,7 @@ typedef uintmax_t uatomic_max_t;
__typeof (*(mem)) __tmp; \
__typeof (mem) __memp = (mem); \
__asm __volatile ( \
- "1: lwarx %0,0,%1\n" \
+ "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
" cmpw %0,%2\n" \
" bne 2f\n" \
" stwcx. %3,0,%1\n" \
@@ -95,7 +102,7 @@ typedef uintmax_t uatomic_max_t;
__typeof (*(mem)) __tmp; \
__typeof (mem) __memp = (mem); \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: lwarx %0,0,%1\n" \
+ "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
" cmpw %0,%2\n" \
" bne 2f\n" \
" stwcx. %3,0,%1\n" \
@@ -111,7 +118,7 @@ typedef uintmax_t uatomic_max_t;
({ \
__typeof (*mem) __val; \
__asm __volatile ( \
- "1: lwarx %0,0,%2\n" \
+ "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
" stwcx. %3,0,%2\n" \
" bne- 1b\n" \
" " __ARCH_ACQ_INSTR \
@@ -125,7 +132,7 @@ typedef uintmax_t uatomic_max_t;
({ \
__typeof (*mem) __val; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: lwarx %0,0,%2\n" \
+ "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
" stwcx. %3,0,%2\n" \
" bne- 1b" \
: "=&r" (__val), "=m" (*mem) \
diff --git a/sysdeps/powerpc/powerpc32/bits/atomic.h b/sysdeps/powerpc/powerpc32/bits/atomic.h
index 6fcc669fb1..62cf991b8d 100644
--- a/sysdeps/powerpc/powerpc32/bits/atomic.h
+++ b/sysdeps/powerpc/powerpc32/bits/atomic.h
@@ -1,5 +1,5 @@
/* Atomic operations. PowerPC32 version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
@@ -18,17 +18,33 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* POWER6 adds a "Mutex Hint" to the Load and Reserve instruction.
+ This is a hint to the hardware to expect additional updates adjacent
+ to the lock word or not. If we are acquiring a Mutex, the hint
+ should be true. Otherwise we releasing a Mutex or doing a simple
+ atomic operation. In that case we don't expect addtional updates
+ adjacent to the lock word after the Store Conditional and the hint
+ should be false. */
+
+#if defined _ARCH_PWR6 || defined _ARCH_PWR6X
+# define MUTEX_HINT_ACQ ",1"
+# define MUTEX_HINT_REL ",0"
+#else
+# define MUTEX_HINT_ACQ
+# define MUTEX_HINT_REL
+#endif
+
/*
* The 32-bit exchange_bool is different on powerpc64 because the subf
* does signed 64-bit arthmatic while the lwarx is 32-bit unsigned
* (a load word and zero (high 32) form). So powerpc64 has a slightly
* different version in sysdeps/powerpc/powerpc64/bits/atomic.h.
*/
-# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
({ \
unsigned int __tmp; \
__asm __volatile ( \
- "1: lwarx %0,0,%1\n" \
+ "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
" subf. %0,%2,%0\n" \
" bne 2f\n" \
" stwcx. %3,0,%1\n" \
@@ -40,11 +56,11 @@
__tmp != 0; \
})
-# define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
({ \
unsigned int __tmp; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: lwarx %0,0,%1\n" \
+ "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
" subf. %0,%2,%0\n" \
" bne 2f\n" \
" stwcx. %3,0,%1\n" \
@@ -59,34 +75,34 @@
/* Powerpc32 processors don't implement the 64-bit (doubleword) forms of
load and reserve (ldarx) and store conditional (stdcx.) instructions.
So for powerpc32 we stub out the 64-bit forms. */
-# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
(abort (), 0)
-# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
(abort (), (__typeof (*mem)) 0)
-# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
(abort (), 0)
-# define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
+#define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
(abort (), (__typeof (*mem)) 0)
-# define __arch_atomic_exchange_64_acq(mem, value) \
+#define __arch_atomic_exchange_64_acq(mem, value) \
({ abort (); (*mem) = (value); })
-# define __arch_atomic_exchange_64_rel(mem, value) \
+#define __arch_atomic_exchange_64_rel(mem, value) \
({ abort (); (*mem) = (value); })
-# define __arch_atomic_exchange_and_add_64(mem, value) \
+#define __arch_atomic_exchange_and_add_64(mem, value) \
({ abort (); (*mem) = (value); })
-# define __arch_atomic_increment_val_64(mem) \
+#define __arch_atomic_increment_val_64(mem) \
({ abort (); (*mem)++; })
-# define __arch_atomic_decrement_val_64(mem) \
+#define __arch_atomic_decrement_val_64(mem) \
({ abort (); (*mem)--; })
-# define __arch_atomic_decrement_if_positive_64(mem) \
+#define __arch_atomic_decrement_if_positive_64(mem) \
({ abort (); (*mem)--; })
#ifdef _ARCH_PWR4
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index fc460993b1..fc2ce7c1d9 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -26,10 +26,9 @@
#include <dl-machine.h>
#include <stdio-common/_itoa.h>
-/* The value __cache_line_size is defined in memset.S and is initialised
+/* The value __cache_line_size is defined in dl-sysdep.c and is initialised
by _dl_sysdep_start via DL_PLATFORM_INIT. */
-extern int __cache_line_size;
-weak_extern (__cache_line_size)
+extern int __cache_line_size attribute_hidden;
/* Because ld.so is now versioned, these functions can be in their own file;
no relocations need to be done to call them.
@@ -318,15 +317,9 @@ __elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
/* Default minimum 4 words per cache line. */
int line_size_words = 4;
- /* Don't try this until ld.so has relocated itself! */
- int *line_size_ptr = &__cache_line_size;
- if (lazy && line_size_ptr != NULL)
- {
- /* Verify that __cache_line_size is defined and set. */
- if (*line_size_ptr != 0)
- /* Convert bytes to words. */
- line_size_words = *line_size_ptr / 4;
- }
+ if (lazy && __cache_line_size != 0)
+ /* Convert bytes to words. */
+ line_size_words = __cache_line_size / 4;
size_modified = lazy ? rel_offset_words : 6;
for (i = 0; i < size_modified; i += line_size_words)
diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S
index f09c294674..454abb2b65 100644
--- a/sysdeps/powerpc/powerpc32/memset.S
+++ b/sysdeps/powerpc/powerpc32/memset.S
@@ -1,5 +1,5 @@
/* Optimized memset implementation for PowerPC.
- Copyright (C) 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2003, 2007 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
@@ -21,14 +21,6 @@
#include <bp-sym.h>
#include <bp-asm.h>
-/* Define a global static that can hold the cache line size. The
- assumption is that startup code will access the "aux vector" to
- to obtain the value set by the kernel and store it into this
- variable. */
-
- .globl __cache_line_size
- .lcomm __cache_line_size,4,4
-
/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
Returns 's'.
diff --git a/sysdeps/powerpc/powerpc64/bits/atomic.h b/sysdeps/powerpc/powerpc64/bits/atomic.h
index e46dc1e4d7..3465bb31b4 100644
--- a/sysdeps/powerpc/powerpc64/bits/atomic.h
+++ b/sysdeps/powerpc/powerpc64/bits/atomic.h
@@ -1,5 +1,5 @@
/* Atomic operations. PowerPC64 version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
@@ -18,17 +18,33 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* POWER6 adds a "Mutex Hint" to the Load and Reserve instruction.
+ This is a hint to the hardware to expect additional updates adjacent
+ to the lock word or not. If we are acquiring a Mutex, the hint
+ should be true. Otherwise we releasing a Mutex or doing a simple
+ atomic operation. In that case we don't expect addtional updates
+ adjacent to the lock word after the Store Conditional and the hint
+ should be false. */
+
+#if defined _ARCH_PWR6 || defined _ARCH_PWR6X
+# define MUTEX_HINT_ACQ ",1"
+# define MUTEX_HINT_REL ",0"
+#else
+# define MUTEX_HINT_ACQ
+# define MUTEX_HINT_REL
+#endif
+
/* The 32-bit exchange_bool is different on powerpc64 because the subf
does signed 64-bit arthmatic while the lwarx is 32-bit unsigned
(a load word and zero (high 32) form) load.
In powerpc64 register values are 64-bit by default, including oldval.
The value in old val unknown sign extension, lwarx loads the 32-bit
value as unsigned. So we explicitly clear the high 32 bits in oldval. */
-# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
({ \
unsigned int __tmp, __tmp2; \
__asm __volatile (" clrldi %1,%1,32\n" \
- "1: lwarx %0,0,%2\n" \
+ "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
" subf. %0,%1,%0\n" \
" bne 2f\n" \
" stwcx. %4,0,%2\n" \
@@ -40,12 +56,12 @@
__tmp != 0; \
})
-# define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
({ \
unsigned int __tmp, __tmp2; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
" clrldi %1,%1,32\n" \
- "1: lwarx %0,0,%2\n" \
+ "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
" subf. %0,%1,%0\n" \
" bne 2f\n" \
" stwcx. %4,0,%2\n" \
@@ -62,11 +78,11 @@
* and Store doubleword conditional indexed (stdcx) instructions. So here
* we define the 64-bit forms.
*/
-# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
({ \
unsigned long __tmp; \
__asm __volatile ( \
- "1: ldarx %0,0,%1\n" \
+ "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
" subf. %0,%2,%0\n" \
" bne 2f\n" \
" stdcx. %3,0,%1\n" \
@@ -78,11 +94,11 @@
__tmp != 0; \
})
-# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
+#define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
({ \
unsigned long __tmp; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: ldarx %0,0,%1\n" \
+ "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
" subf. %0,%2,%0\n" \
" bne 2f\n" \
" stdcx. %3,0,%1\n" \
@@ -99,7 +115,7 @@
__typeof (*(mem)) __tmp; \
__typeof (mem) __memp = (mem); \
__asm __volatile ( \
- "1: ldarx %0,0,%1\n" \
+ "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
" cmpd %0,%2\n" \
" bne 2f\n" \
" stdcx. %3,0,%1\n" \
@@ -116,7 +132,7 @@
__typeof (*(mem)) __tmp; \
__typeof (mem) __memp = (mem); \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: ldarx %0,0,%1\n" \
+ "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \
" cmpd %0,%2\n" \
" bne 2f\n" \
" stdcx. %3,0,%1\n" \
@@ -128,11 +144,11 @@
__tmp; \
})
-# define __arch_atomic_exchange_64_acq(mem, value) \
+#define __arch_atomic_exchange_64_acq(mem, value) \
({ \
__typeof (*mem) __val; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: ldarx %0,0,%2\n" \
+ "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
" stdcx. %3,0,%2\n" \
" bne- 1b\n" \
" " __ARCH_ACQ_INSTR \
@@ -142,11 +158,11 @@
__val; \
})
-# define __arch_atomic_exchange_64_rel(mem, value) \
+#define __arch_atomic_exchange_64_rel(mem, value) \
({ \
__typeof (*mem) __val; \
__asm __volatile (__ARCH_REL_INSTR "\n" \
- "1: ldarx %0,0,%2\n" \
+ "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
" stdcx. %3,0,%2\n" \
" bne- 1b" \
: "=&r" (__val), "=m" (*mem) \
@@ -155,7 +171,7 @@
__val; \
})
-# define __arch_atomic_exchange_and_add_64(mem, value) \
+#define __arch_atomic_exchange_and_add_64(mem, value) \
({ \
__typeof (*mem) __val, __tmp; \
__asm __volatile ("1: ldarx %0,0,%3\n" \
@@ -168,7 +184,7 @@
__val; \
})
-# define __arch_atomic_increment_val_64(mem) \
+#define __arch_atomic_increment_val_64(mem) \
({ \
__typeof (*(mem)) __val; \
__asm __volatile ("1: ldarx %0,0,%2\n" \
@@ -181,7 +197,7 @@
__val; \
})
-# define __arch_atomic_decrement_val_64(mem) \
+#define __arch_atomic_decrement_val_64(mem) \
({ \
__typeof (*(mem)) __val; \
__asm __volatile ("1: ldarx %0,0,%2\n" \
@@ -194,7 +210,7 @@
__val; \
})
-# define __arch_atomic_decrement_if_positive_64(mem) \
+#define __arch_atomic_decrement_if_positive_64(mem) \
({ int __val, __tmp; \
__asm __volatile ("1: ldarx %0,0,%3\n" \
" cmpdi 0,%0,0\n" \
@@ -212,13 +228,13 @@
/*
* All powerpc64 processors support the new "light weight" sync (lwsync).
*/
-# define atomic_read_barrier() __asm ("lwsync" ::: "memory")
+#define atomic_read_barrier() __asm ("lwsync" ::: "memory")
/*
* "light weight" sync can also be used for the release barrier.
*/
-# ifndef UP
-# define __ARCH_REL_INSTR "lwsync"
-# endif
+#ifndef UP
+# define __ARCH_REL_INSTR "lwsync"
+#endif
/*
* Include the rest of the atomic ops macros which are common to both
diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S
index 09c79fccd7..e0742ea73f 100644
--- a/sysdeps/powerpc/powerpc64/memset.S
+++ b/sysdeps/powerpc/powerpc64/memset.S
@@ -1,5 +1,6 @@
/* Optimized memset implementation for PowerPC64.
- Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002, 2003, 2007
+ 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
@@ -21,12 +22,6 @@
#include <bp-sym.h>
#include <bp-asm.h>
-/* Define a global static that can hold the cache line size. The
- assumption is that startup code will access the "aux vector" to
- to obtain the value set by the kernel and store it into this
- variable. */
- .globl __cache_line_size
- .lcomm __cache_line_size,4,4
.section ".toc","aw"
.LC0:
.tc __cache_line_size[TC],__cache_line_size
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 8bec6cdb85..1d9443a5fe 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -134,7 +134,8 @@ CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1
endif
ifeq ($(subdir),io)
-sysdep_routines += xstatconv internal_statvfs internal_statvfs64
+sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
+ sync_file_range
endif
ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 137b44c2b8..bb5b862689 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -124,10 +124,10 @@ libc {
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
GLIBC_2.5 {
- splice; sync_file_range; tee; vmsplice;
+ splice; tee; vmsplice;
}
GLIBC_2.6 {
- epoll_pwait;
+ epoll_pwait; sync_file_range;
}
GLIBC_PRIVATE {
# functions used in other libraries
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
index 7c02c68985..9bb8ec3f61 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -1,5 +1,6 @@
/* Operating system support for run-time dynamic linker. Linux/PPC version.
- Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2001, 2003, 2006, 2007
+ 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
@@ -21,8 +22,7 @@
#include <kernel-features.h>
#include <ldsodefs.h>
-extern int __cache_line_size;
-weak_extern (__cache_line_size)
+int __cache_line_size attribute_hidden;
/* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
verify that the static extern __cache_line_size is defined by checking
@@ -30,12 +30,8 @@ weak_extern (__cache_line_size)
value to __cache_line_size. */
#define DL_PLATFORM_AUXV \
case AT_DCACHEBSIZE: \
- { \
- int *cls = & __cache_line_size; \
- if (cls != NULL) \
- *cls = av->a_un.a_val; \
- } \
- break;
+ __cache_line_size = av->a_un.a_val; \
+ break;
#ifndef __ASSUME_STD_AUXV
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
index a8005c1163..923eab99ef 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1998,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ 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
@@ -22,8 +23,7 @@
#include <bp-start.h>
#include <bp-sym.h>
-extern int __cache_line_size;
-weak_extern (__cache_line_size)
+int __cache_line_size attribute_hidden;
/* The main work is done in the generic function. */
#define LIBC_START_MAIN generic_start_main
#define LIBC_START_DISABLE_INLINE
@@ -113,11 +113,7 @@ int
switch (av->a_type)
{
case AT_DCACHEBSIZE:
- {
- int *cls = &__cache_line_size;
- if (cls != NULL)
- *cls = av->a_un.a_val;
- }
+ __cache_line_size = av->a_un.a_val;
break;
}
#ifdef SHARED
diff --git a/timezone/africa b/timezone/africa
index d73d340751..141365cce3 100644
--- a/timezone/africa
+++ b/timezone/africa
@@ -1,4 +1,4 @@
-# @(#)africa 8.5
+# @(#)africa 8.7
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -232,8 +232,8 @@ Zone Africa/Malabo 0:35:08 - LMT 1912
# Eritrea
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Asmera 2:35:32 - LMT 1870
- 2:35:32 - AMT 1890 # Asmera Mean Time
+Zone Africa/Asmara 2:35:32 - LMT 1870
+ 2:35:32 - AMT 1890 # Asmara Mean Time
2:35:20 - ADMT 1936 May 5 # Adis Dera MT
3:00 - EAT
diff --git a/timezone/asia b/timezone/asia
index 04ddc863e7..78c2cf5967 100644
--- a/timezone/asia
+++ b/timezone/asia
@@ -1,4 +1,4 @@
-# @(#)asia 8.8
+# @(#)asia 8.10
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -217,7 +217,7 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
# BTW, I did some research on-line and found some info regarding these five
# historic timezones from some Taiwan websites. And yes, there are official
# Chinese names for these locales (before 1949).
-#
+#
# From Jesper Norgaard Welen (2006-07-14):
# I have investigated the timezones around 1970 on the
# http://www.astro.com/atlas site [with provinces and county
@@ -413,6 +413,8 @@ Zone Asia/Tbilisi 2:59:16 - LMT 1880
# East Timor
+# See Indonesia for the 1945 transition.
+
# From Joao Carrascalao, brother of the former governor of East Timor, in
# <a href="http://etan.org/et99c/december/26-31/30ETMAY.htm">
# East Timor may be late for its millennium
@@ -437,7 +439,7 @@ Zone Asia/Tbilisi 2:59:16 - LMT 1880
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Dili 8:22:20 - LMT 1912
8:00 - TLT 1942 Feb 21 23:00 # E Timor Time
- 9:00 - JST 1945 Aug
+ 9:00 - JST 1945 Sep 23
9:00 - TLT 1976 May 3
8:00 - CIT 2000 Sep 17 00:00
9:00 - TLT
@@ -463,6 +465,19 @@ Zone Asia/Calcutta 5:53:28 - LMT 1880 # Kolkata
# time zone maps, I think that must refer to Western Borneo (Kalimantan Barat
# and Kalimantan Tengah) switching from UTC+8 to UTC+7.
#
+# From Paul Eggert (2007-03-10):
+# Here is another correction to Shanks & Pottenger.
+# JohnTWB writes that Japanese forces did not surrender control in
+# Indonesia until 1945-09-01 00:00 at the earliest (in Jakarta) and
+# other formal surrender ceremonies were September 9, 11, and 13, plus
+# September 12 for the regional surrender to Mountbatten in Singapore.
+# These would be the earliest possible times for a change.
+# Regimes horaires pour le monde entier, by Henri Le Corre, (Editions
+# Traditionnelles, 1987, Paris) says that Java and Madura switched
+# from JST to UTC+07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura
+# (Hollandia). For now, assume all Indonesian locations other than Jayapura
+# switched on 1945-09-23.
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
# Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
@@ -470,7 +485,7 @@ Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
7:07:12 - JMT 1923 Dec 31 23:47:12 # Jakarta
7:20 - JAVT 1932 Nov # Java Time
7:30 - WIT 1942 Mar 23
- 9:00 - JST 1945 Aug
+ 9:00 - JST 1945 Sep 23
7:30 - WIT 1948 May
8:00 - WIT 1950 May
7:30 - WIT 1964
@@ -478,7 +493,7 @@ Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
Zone Asia/Pontianak 7:17:20 - LMT 1908 May
7:17:20 - PMT 1932 Nov # Pontianak MT
7:30 - WIT 1942 Jan 29
- 9:00 - JST 1945 Aug
+ 9:00 - JST 1945 Sep 23
7:30 - WIT 1948 May
8:00 - WIT 1950 May
7:30 - WIT 1964
@@ -487,10 +502,10 @@ Zone Asia/Pontianak 7:17:20 - LMT 1908 May
Zone Asia/Makassar 7:57:36 - LMT 1920
7:57:36 - MMT 1932 Nov # Macassar MT
8:00 - CIT 1942 Feb 9
- 9:00 - JST 1945 Aug
+ 9:00 - JST 1945 Sep 23
8:00 - CIT
Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
- 9:00 - EIT 1944
+ 9:00 - EIT 1944 Sep 1
9:30 - CST 1964
9:00 - EIT
@@ -614,7 +629,7 @@ Rule Iraq 1985 1990 - Sep lastSun 1:00s 0 S
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
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -1293,6 +1308,11 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# parliament passed during the tumultuous winter session."
# For now, let's ignore this information, until we have more confirmation.
+# From Ganbold Ts. (2007-02-26):
+# Parliament of Mongolia has just changed the daylight-saving rule in February.
+# They decided not to adopt daylight-saving time....
+# http://www.mongolnews.mn/index.php?module=unuudur&sec=view&id=15742
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 -
@@ -1311,8 +1331,8 @@ Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S
Rule Mongol 1984 1998 - Sep lastSun 0:00 0 -
# IATA SSIM (1999-09) says Mongolia no longer observes DST.
Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S
-Rule Mongol 2001 max - Sep lastSat 2:00 0 -
-Rule Mongol 2002 max - Mar lastSat 2:00 1:00 S
+Rule Mongol 2001 2006 - Sep lastSat 2:00 0 -
+Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
diff --git a/timezone/australasia b/timezone/australasia
index 2e17bcc0c3..40b0bf65f6 100644
--- a/timezone/australasia
+++ b/timezone/australasia
@@ -1,4 +1,4 @@
-# @(#)australasia 8.3
+# @(#)australasia 8.6
# <pre>
# This file also includes Pacific islands.
@@ -29,15 +29,24 @@ Zone Australia/Darwin 8:43:20 - LMT 1895 Feb
9:00 - CST 1899 May
9:30 Aus CST
# Western Australia
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule AW 1974 only - Oct lastSun 2:00s 1:00 -
+Rule AW 1975 only - Mar Sun>=1 2:00s 0 -
+Rule AW 1983 only - Oct lastSun 2:00s 1:00 -
+Rule AW 1984 only - Mar Sun>=1 2:00s 0 -
+Rule AW 1991 only - Nov 17 2:00s 1:00 -
+Rule AW 1992 only - Mar Sun>=1 2:00s 0 -
+Rule AW 2006 only - Dec 3 2:00s 1:00 -
+Rule AW 2007 2009 - Mar lastSun 2:00s 0 -
+Rule AW 2007 2008 - Oct lastSun 2:00s 1:00 -
Zone Australia/Perth 7:43:24 - LMT 1895 Dec
8:00 Aus WST 1943 Jul
- 8:00 - WST 1974 Oct lastSun 2:00s
- 8:00 1:00 WST 1975 Mar Sun>=1 2:00s
- 8:00 - WST 1983 Oct lastSun 2:00s
- 8:00 1:00 WST 1984 Mar Sun>=1 2:00s
- 8:00 - WST 1991 Nov 17 2:00s
- 8:00 1:00 WST 1992 Mar Sun>=1 2:00s
- 8:00 - WST
+ 8:00 AW WST
+Zone Australia/Eucla 8:35:28 - LMT 1895 Dec
+ 8:45 Aus CWST 1943 Jul
+ 8:45 AW CWST
+
# Queensland
#
# From Alex Livingston (1996-11-01):
@@ -193,16 +202,16 @@ Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb
#
# Ashmore Is, Cartier
# no indigenous inhabitants; only seasonal caretakers
-# like Australia/Perth, says Turner
+# no times are set
#
# Coral Sea Is
# no indigenous inhabitants; only meteorologists
-# no information
+# no times are set
#
# Macquarie
# permanent occupation (scientific station) since 1948;
# sealing and penguin oil station operated 1888/1917
-# like Australia/Hobart, says Turner
+# like Australia/Hobart
# Christmas
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -534,6 +543,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# std dst
# LMT Local Mean Time
# 8:00 WST WST Western Australia
+# 8:45 CWST CWST Central Western Australia*
# 9:00 JST Japan
# 9:30 CST CST Central Australia
# 10:00 EST EST Eastern Australia
@@ -806,37 +816,51 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Arthur David Olson (1992-03-08):
# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes.
+# From Christopher Hunt (2006-11-21), after an advance warning
+# from Jesper Norgaard Welen (2006-11-01):
+# WA are trialing DST for three years.
+# <http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf>
+
# From Rives McDow (2002-04-09):
# The most interesting region I have found consists of three towns on the
-# southern coast of Australia, population 10 at last report, along with
-# 50,000 sheep, about 100 kilometers long and 40 kilometers into the
-# continent. The primary town is Madura, with the other towns being
-# Mundrabilla and Eucla. According to the sheriff of Madura, the
-# residents got tired of having to change the time so often, as they are
-# located in a strip overlapping the border of South Australia and Western
-# Australia. South Australia observes daylight saving time; Western
+# southern coast.... South Australia observes daylight saving time; Western
# Australia does not. The two states are one and a half hours apart. The
# residents decided to forget about this nonsense of changing the clock so
# much and set the local time 20 hours and 45 minutes from the
# international date line, or right in the middle of the time of South
-# Australia and Western Australia. As it only affects about 10 people and
-# tourists staying at the Madura Motel, it has never really made as big an
-# impact as Broken Hill. However, as tourist visiting there or anyone
-# calling the local sheriff will attest, they do keep time in this way.
+# Australia and Western Australia....
#
# From Paul Eggert (2002-04-09):
# This is confirmed by the section entitled
# "What's the deal with time zones???" in
-# <http://www.earthsci.unimelb.edu.au/~awatkins/null.html>,
-# which says a few other things:
-#
-# * Border Village, SA also is 45 minutes ahead of Perth.
-# * The locals call this time zone "central W.A. Time" (presumably "CWAT").
-# * The locals also call Western Australia time "Perth time".
-#
-# It's not clear from context whether everyone in Western Australia
-# knows of this naming convention, or whether it's just the people in
-# this subregion.
+# <http://www.earthsci.unimelb.edu.au/~awatkins/null.html>.
+#
+# From Alex Livingston (2006-12-07):
+# ... it was just on four years ago that I drove along the Eyre Highway,
+# which passes through eastern Western Australia close to the southern
+# coast of the continent.
+#
+# I paid particular attention to the time kept there. There can be no
+# dispute that UTC+08:45 was considered "the time" from the border
+# village just inside the border with South Australia to as far west
+# as just east of Caiguna. There can also be no dispute that Eucla is
+# the largest population centre in this zone....
+#
+# Now that Western Australia is observing daylight saving, the
+# question arose whether this part of the state would follow suit. I
+# just called the border village and confirmed that indeed they have,
+# meaning that they are now observing UTC+09:45.
+#
+# (2006-12-09):
+# I personally doubt that either experimentation with daylight saving
+# in WA or its introduction in SA had anything to do with the genesis
+# of this time zone. My hunch is that it's been around since well
+# before 1975. I remember seeing it noted on road maps decades ago.
+
+# From Paul Eggert (2006-12-15):
+# For lack of better info, assume the tradition dates back to the
+# introduction of standard time in 1895.
+
# South Australia, Tasmania, Victoria
diff --git a/timezone/backward b/timezone/backward
index 00824407fa..7c922604e2 100644
--- a/timezone/backward
+++ b/timezone/backward
@@ -1,8 +1,9 @@
-# @(#)backward 8.2
+# @(#)backward 8.3
# This file provides links between current names for time zones
# and their old names. Many names changed in late 1993.
+Link Africa/Asmara Africa/Asmera
Link Africa/Bamako Africa/Timbuktu
Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
Link America/Adak America/Atka
@@ -28,6 +29,7 @@ Link Asia/Jerusalem Asia/Tel_Aviv
Link Asia/Thimphu Asia/Thimbu
Link Asia/Makassar Asia/Ujung_Pandang
Link Asia/Ulaanbaatar Asia/Ulan_Bator
+Link Atlantic/Faroe Atlantic/Faeroe
Link Australia/Sydney Australia/ACT
Link Australia/Sydney Australia/Canberra
Link Australia/Lord_Howe Australia/LHI
diff --git a/timezone/europe b/timezone/europe
index b3a3b269d3..79c068ee5f 100644
--- a/timezone/europe
+++ b/timezone/europe
@@ -1,4 +1,4 @@
-# @(#)europe 8.6
+# @(#)europe 8.10
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -259,32 +259,32 @@
# -- James Joyce, Ulysses
# From Joseph S. Myers (2005-01-26):
-# Irish laws are available online at www.irishstatutebook.ie. These include
+# Irish laws are available online at www.irishstatutebook.ie. These include
# various relating to legal time, for example:
-#
+#
# ZZA13Y1923.html ZZA12Y1924.html ZZA8Y1925.html ZZSIV20PG1267.html
-#
+#
# ZZSI71Y1947.html ZZSI128Y1948.html ZZSI23Y1949.html ZZSI41Y1950.html
# ZZSI27Y1951.html ZZSI73Y1952.html
-#
+#
# ZZSI11Y1961.html ZZSI232Y1961.html ZZSI182Y1962.html
# ZZSI167Y1963.html ZZSI257Y1964.html ZZSI198Y1967.html
# ZZA23Y1968.html ZZA17Y1971.html
-#
+#
# ZZSI67Y1981.html ZZSI212Y1982.html ZZSI45Y1986.html
# ZZSI264Y1988.html ZZSI52Y1990.html ZZSI371Y1992.html
# ZZSI395Y1994.html ZZSI484Y1997.html ZZSI506Y2001.html
#
# [These are all relative to the root, e.g., the first is
# <http://www.irishstatutebook.ie/ZZA13Y1923.html>.]
-#
-# (These are those I found, but there could be more. In any case these
-# should allow various updates to the comments in the europe file to cover
+#
+# (These are those I found, but there could be more. In any case these
+# should allow various updates to the comments in the europe file to cover
# the laws applicable in Ireland.)
-#
-# (Note that the time in the Republic of Ireland since 1968 has been defined
-# in terms of standard time being GMT+1 with a period of winter time when it
-# is GMT, rather than standard time being GMT with a period of summer time
+#
+# (Note that the time in the Republic of Ireland since 1968 has been defined
+# in terms of standard time being GMT+1 with a period of winter time when it
+# is GMT, rather than standard time being GMT with a period of summer time
# being GMT+1.)
# From Paul Eggert (1999-03-28):
@@ -754,7 +754,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850
1:00 Czech CE%sT 1979
1:00 EU CE%sT
-# Denmark, Faeroe Islands, and Greenland
+# Denmark, Faroe Islands, and Greenland
# From Jesper Norgaard Welen (2005-04-26):
# http://www.hum.aau.dk/~poe/tid/tine/DanskTid.htm says that the law
@@ -809,7 +809,7 @@ Zone Europe/Copenhagen 0:50:20 - LMT 1890
1:00 C-Eur CE%sT 1945 Apr 2 2:00
1:00 Denmark CE%sT 1980
1:00 EU CE%sT
-Zone Atlantic/Faeroe -0:27:04 - LMT 1908 Jan 11 # Torshavn
+Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Torshavn
0:00 - WET 1981
0:00 EU WE%sT
#
@@ -2278,6 +2278,34 @@ Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12
1:00 EU CE%sT
# Turkey
+
+# From Amar Devegowda (2007-01-03):
+# The time zone rules for Istanbul, Turkey have not been changed for years now.
+# ... The latest rules are available at -
+# http://www.timeanddate.com/worldclock/timezone.html?n=107
+# From Steffen Thorsen (2007-01-03):
+# I have been able to find press records back to 1996 which all say that
+# DST started 01:00 local time and end at 02:00 local time. I am not sure
+# what happened before that. One example for each year from 1996 to 2001:
+# http://newspot.byegm.gov.tr/arsiv/1996/21/N4.htm
+# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING97/03/97X03X25.TXT
+# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING98/03/98X03X02.HTM
+# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING99/10/99X10X26.HTM#%2016
+# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING2000/03/00X03X06.HTM#%2021
+# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING2001/03/23x03x01.HTM#%2027
+# From Paul Eggert (2007-01-03):
+# Prefer the above source to Shanks & Pottenger for time stamps after 1990.
+
+# From Steffen Thorsen (2007-03-09):
+# Starting 2007 though, it seems that they are adopting EU's 1:00 UTC
+# start/end time, according to the following page (2007-03-07):
+# http://www.ntvmsnbc.com/news/402029.asp
+# The official document is located here - it is in Turkish...:
+# http://rega.basbakanlik.gov.tr/eskiler/2007/03/20070307-7.htm
+# I was able to locate the following seemingly official document
+# (on a non-government server though) describing dates between 2002 and 2006:
+# http://www.alomaliye.com/bkk_2002_3769.htm
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
Rule Turkey 1916 only - Oct 1 0:00 0 -
@@ -2332,13 +2360,17 @@ Rule Turkey 1983 only - Jul 31 0:00 1:00 S
Rule Turkey 1983 only - Oct 2 0:00 0 -
Rule Turkey 1985 only - Apr 20 0:00 1:00 S
Rule Turkey 1985 only - Sep 28 0:00 0 -
+Rule Turkey 1986 1990 - Mar lastSun 2:00s 1:00 S
+Rule Turkey 1986 1990 - Sep lastSun 2:00s 0 -
+Rule Turkey 1991 2006 - Mar lastSun 1:00s 1:00 S
+Rule Turkey 1991 1995 - Sep lastSun 1:00s 0 -
+Rule Turkey 1996 2006 - Oct lastSun 1:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Istanbul 1:55:52 - LMT 1880
1:56:56 - IMT 1910 Oct # Istanbul Mean Time?
2:00 Turkey EE%sT 1978 Oct 15
3:00 Turkey TR%sT 1985 Apr 20 # Turkey Time
- 2:00 Turkey EE%sT 1986
- 2:00 C-Eur EE%sT 1991
+ 2:00 Turkey EE%sT 2007
2:00 EU EE%sT
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
diff --git a/timezone/iso3166.tab b/timezone/iso3166.tab
index 8bb8231055..0e985e95b4 100644
--- a/timezone/iso3166.tab
+++ b/timezone/iso3166.tab
@@ -1,6 +1,6 @@
# ISO 3166 alpha-2 country codes
#
-# @(#)iso3166.tab 8.3
+# @(#)iso3166.tab 8.4
#
# From Paul Eggert (2006-09-27):
#
@@ -92,7 +92,7 @@ FI Finland
FJ Fiji
FK Falkland Islands
FM Micronesia
-FO Faeroe Islands
+FO Faroe Islands
FR France
GA Gabon
GB Britain (UK)
diff --git a/timezone/leapseconds b/timezone/leapseconds
index d2b506bab5..6b99037785 100644
--- a/timezone/leapseconds
+++ b/timezone/leapseconds
@@ -1,4 +1,4 @@
-# @(#)leapseconds 8.1
+# @(#)leapseconds 8.3
# Allowance for leapseconds added to each timezone file.
@@ -45,48 +45,38 @@ Leap 1997 Jun 30 23:59:60 + S
Leap 1998 Dec 31 23:59:60 + S
Leap 2005 Dec 31 23:59:60 + S
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
+# ...
+# Sent: Thursday, February 01, 2007 9:49 AM
+# ...
+# Subject: Bulletin C number 33
+#
+# 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
# 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel. : 33 (0) 1 40 51 22 26
-# FAX : 33 (0) 1 40 51 22 91
# ...
-# http://hpiers.obspm.fr/eop-pc
-#
-# Paris, 4 July 2005
-#
-# Bulletin C 30
-#
-# To authorities responsible
-# for the measurement and
-# distribution of time
-#
-#
-# UTC TIME STEP
-# on the 1st of January 2006
-#
-# A positive leap second will be introduced at the end of December 2005.
-# The sequence of dates of the UTC second markers will be:
-#
-# 2005 December 31, 23h 59m 59s
-# 2005 December 31, 23h 59m 60s
-# 2006 January 1, 0h 0m 0s
#
-# The difference between UTC and the International Atomic Time TAI is:
+# Paris, 1 February 2007
+# Bulletin C 33
+# To authorities responsible
+# for the measurement and
+# distribution of time
#
-# from 1999 January 1, 0h UTC, to 2006 January 1 0h UTC : UTC-TAI = - 32s
-# from 2006 January 1, 0h UTC, until further notice : UTC-TAI = - 33s
+# INFORMATION ON UTC - TAI
#
-# Leap seconds can be introduced in UtC at the end of the months of December
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC or to confirm that there
-# will be no time step at the next possible date.
+# NO positive leap second will be introduced at the end of June 2007.
+# The difference between Coordinated Universal Time UTC and the
+# International Atomic Time TAI is:
+# from 2006 January 1, 0h UTC, until further notice : UTC-TAI = -33 s
+# Leap seconds can be introduced in UTC at the end of the months of
+# December or June, depending on the evolution of UT1-TAI. Bulletin C is
+# mailed every six months, either to announce a time step in UTC, or to
+# confirm that there will be no time step at the next possible date.
#
-# Daniel GAMBIS
-# Head
-# Earth Orientation Center of IERS
-# Observatoire de Paris, France
+# Daniel GAMBIS
+# Director
+# Earth Orientation Center of IERS
+# Observatoire de Paris, France
diff --git a/timezone/northamerica b/timezone/northamerica
index 3d80c5e3c2..3184b7bdff 100644
--- a/timezone/northamerica
+++ b/timezone/northamerica
@@ -1,4 +1,4 @@
-# @(#)northamerica 8.10
+# @(#)northamerica 8.15
# <pre>
# also includes Central America and the Caribbean
@@ -307,6 +307,11 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# "bar time" in the state corresponds to 02:00, a number of citations
# are issued for the "sale of class 'B' alcohol after prohibited
# hours" within the deviated hour of this change every year....
+#
+# From Douglas R. Bomberg (2007-03-12):
+# Wisconsin has enacted (nearly eleventh-hour) legislation to get WI
+# Statue 175 closer in synch with the US Congress' intent....
+# http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Chicago 1920 only - Jun 13 2:00 1:00 D
@@ -583,6 +588,11 @@ Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
# clocks twice that night, but this obviously is in error. The intent
# is that 01:59:59 EST be followed by 02:00:00 CDT.
+# From Gwillim Law (2007-02-10):
+# The Associated Press has been reporting that Pulaski County, Indiana is
+# going to switch from Central to Eastern Time on March 11, 2007....
+# http://www.indystar.com/apps/pbcs.dll/article?AID=/20070207/LOCAL190108/702070524/0/LOCAL
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Indianapolis 1941 only - Jun 22 2:00 1:00 D
Rule Indianapolis 1941 1954 - Sep lastSun 2:00 0 S
@@ -618,7 +628,7 @@ Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:14:37
-5:00 - EST 2006
-5:00 US E%sT
#
-# Daviess, Dubois, Knox, Martin, Perry, and Pulaski Counties, Indiana,
+# Daviess, Dubois, Knox, Martin, and Perry Counties, Indiana,
# switched from eastern to central time in April 2006.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Vincennes 1946 only - Apr lastSun 2:00 1:00 D
@@ -676,6 +686,23 @@ Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:13:30
-5:00 - EST 2006 Apr 2 2:00
-6:00 US C%sT
#
+# Pulaski County, Indiana, switched from eastern to central time in
+# April 2006 and then switched back in March 2007.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Pulaski 1946 1960 - Apr lastSun 2:00 1:00 D
+Rule Pulaski 1946 1954 - Sep lastSun 2:00 0 S
+Rule Pulaski 1955 1956 - Oct lastSun 2:00 0 S
+Rule Pulaski 1957 1960 - Sep lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 12:13:35
+ -6:00 US C%sT 1946
+ -6:00 Pulaski C%sT 1961 Apr 30 2:00
+ -5:00 - EST 1969
+ -5:00 US E%sT 1971
+ -5:00 - EST 2006 Apr 2 2:00
+ -6:00 US C%sT 2007 Mar 11 2:00
+ -5:00 US E%sT
+#
# Switzerland County, Indiana, did not observe DST from 1973 through 2005.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
@@ -894,18 +921,17 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# Unless otherwise specified, the data for Canada are all from Shanks
# & Pottenger.
-# From Chris Walton (2006-04-01):
+# From Chris Walton (2006-04-01, 2006-04-25, 2006-06-26, 2007-01-31,
+# 2007-03-01):
# The British Columbia government announced yesterday that it will
# adjust daylight savings next year to align with changes in the
# U.S. and the rest of Canada....
# http://www2.news.gov.bc.ca/news_releases_2005-2009/2006AG0014-000330.htm
-
-# From Chris Walton (2006-04-25):
+# ...
+# Nova Scotia
# Daylight saving time will be extended by four weeks starting in 2007....
-# Here is a news release which was issued today by the Nova Scotia government:
-# http://www.gov.ns.ca/news/details.asp?id=20060425004
-
-# From Chris Walton (2006-06-26):
+# http://www.gov.ns.ca/just/regulations/rg2/2006/ma1206.pdf
+#
# [For New Brunswick] the new legislation dictates that the time change is to
# be done at 02:00 instead of 00:01.
# http://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf
@@ -915,16 +941,18 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# http://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php
# ...
# [Alberta, Ontario, Quebec] will follow US rules.
-# http://www.qp.gov.ab.ca/documents/Acts/2006CH03_UNPR.cfm?frm_isbn=0779744934
+# http://www.qp.gov.ab.ca/documents/spring/CH03_06.CFM
# http://www.e-laws.gov.on.ca/DBLaws/Source/Regs/English/2006/R06111_e.htm
-# http://www.assnat.qc.ca/eng/37legislature2/Projets-loi/Publics/06-a002.htm
+# http://www2.publicationsduquebec.gouv.qc.ca/dynamicSearch/telecharge.php?type=5&file=2006C39A.PDF
# ...
-# P.E.I. will follow US rules. The new legislation is not law yet.
-# It passed first reading on April 20....
-# http://www.assembly.pe.ca/bills/pdf_first/62/3/bill-101.pdf
+# P.E.I. will follow US rules....
+# http://www.assembly.pe.ca/bills/pdf_chapter/62/3/chapter-41.pdf
# ...
-# Province of Newfoundland and Labrador.... The change is being considered.
-# http://www.releases.gov.nl.ca/releases/2006/mpa/0331n01.htm
+# Province of Newfoundland and Labrador....
+# http://www.hoa.gov.nl.ca/hoa/bills/Bill0634.htm
+# ...
+# Yukon
+# http://www.gov.yk.ca/legislation/regs/oic2006_127.pdf
# ...
# N.W.T. will follow US rules. Whoever maintains the government web site
# does not seem to believe in bookmarks. To see the news release, click the
@@ -932,8 +960,10 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# "Daylight Savings Time Change" link; it will fire off a popup using
# JavaScript.
# http://www.exec.gov.nt.ca/currentnews/currentPR.asp?mode=archive
-
-
+# ...
+# Nunavut
+# An amendment to the Interpretation Act was registered on February 19/2007....
+# http://action.attavik.ca/home/justice-gn/attach/2007/gaz02part2.pdf
# From Paul Eggert (2006-04-25):
# H. David Matthews and Mary Vincent's map
@@ -1100,11 +1130,11 @@ Zone America/Glace_Bay -3:59:48 - LMT 1902 Jun 15
# New Brunswick
-# From Paul Eggert (2006-01-20):
-# New Brunswick's Time Definition Act
-# <http://www.gnb.ca/0062/PDF-acts/t-06.pdf> says they change at 00:01, and
+# From Paul Eggert (2007-01-31):
+# The Time Definition Act <http://www.gnb.ca/0062/PDF-acts/t-06.pdf>
+# says they changed at 00:01 through 2006, and
# <http://www.canlii.org/nb/laws/sta/t-6/20030127/whole.html> makes it
-# clear that this has been the case since at least 1993.
+# clear that this was the case since at least 1993.
# For now, assume it started in 1993.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -1676,9 +1706,23 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
# For lack of better information, assume that Southampton Island observed
# daylight saving only during wartime.
-# From Chris Walton (2006-07-19):
-# The government of Yukon Territory ... recently announced it will extend
-# daylight saving in 2007.... http://www.gov.yk.ca/news/2006/06-164.html
+# From Chris Walton (2007-03-01):
+# ... the community of Resolute (located on Cornwallis Island in
+# Nunavut) moved from Central Time to Eastern Time last November.
+# Basically the community did not change its clocks at the end of
+# daylight saving....
+# http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
+
+# From Chris Walton (2007-03-14):
+# Today I phoned the "hamlet office" to find out what Resolute was doing with
+# its clocks.
+#
+# The individual that answered the phone confirmed that the clocks did not
+# move at the end of daylight saving on October 29/2006. He also told me that
+# the clocks did not move this past weekend (March 11/2007)....
+#
+# America/Resolute should use the "Canada" Rule up to October 29/2006.
+# After that it should be fixed on Eastern Standard Time until further notice.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule NT_YK 1918 only - Apr 14 2:00 1:00 D
@@ -1694,33 +1738,39 @@ Rule NT_YK 1980 1986 - Apr lastSun 2:00 1:00 D
Rule NT_YK 1980 2006 - Oct lastSun 2:00 0 S
Rule NT_YK 1987 2006 - Apr Sun>=1 2:00 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Pangnirtung -4:22:56 - LMT 1884
+# aka Panniqtuuq
+Zone America/Pangnirtung 0 - zzz 1921 # trading post est.
-4:00 NT_YK A%sT 1995 Apr Sun>=1 2:00
-5:00 Canada E%sT 1999 Oct 31 2:00
-6:00 Canada C%sT 2000 Oct 29 2:00
-5:00 Canada E%sT
-Zone America/Iqaluit -4:33:52 - LMT 1884 # Frobisher Bay before 1987
+# formerly Frobisher Bay
+Zone America/Iqaluit 0 - zzz 1942 Aug # Frobisher Bay est.
-5:00 NT_YK E%sT 1999 Oct 31 2:00
-6:00 Canada C%sT 2000 Oct 29 2:00
-5:00 Canada E%sT
-# Now subsumed by America/Atikokan.
-#Zone America/Coral_Harbour -5:32:40 - LMT 1884
-# -5:00 NT_YK E%sT 1946
-# -5:00 - EST
-Zone America/Rankin_Inlet -6:08:20 - LMT 1884
+# aka Qausuittuq
+Zone America/Resolute 0 - zzz 1947 Aug 31 # Resolute founded
+ -6:00 NT_YK C%sT 2000 Oct 29 2:00
+ -5:00 - EST 2001 Apr 1 3:00
+ -6:00 Canada C%sT 2006 Oct 29 2:00
+ -5:00 - EST
+# aka Kangiqiniq
+Zone America/Rankin_Inlet 0 - zzz 1957 # Rankin Inlet founded
-6:00 NT_YK C%sT 2000 Oct 29 2:00
-5:00 - EST 2001 Apr 1 3:00
-6:00 Canada C%sT
-Zone America/Cambridge_Bay -7:00:20 - LMT 1884
+# aka Iqaluktuuttiaq
+Zone America/Cambridge_Bay 0 - zzz 1920 # trading post est.?
-7:00 NT_YK M%sT 1999 Oct 31 2:00
-6:00 Canada C%sT 2000 Oct 29 2:00
-5:00 - EST 2000 Nov 5 0:00
-6:00 - CST 2001 Apr 1 3:00
-7:00 Canada M%sT
-Zone America/Yellowknife -7:37:24 - LMT 1884
+Zone America/Yellowknife 0 - zzz 1935 # Yellowknife founded?
-7:00 NT_YK M%sT 1980
-7:00 Canada M%sT
-Zone America/Inuvik -8:54:52 - LMT 1884
+Zone America/Inuvik 0 - zzz 1953 # Inuvik founded
-8:00 NT_YK P%sT 1979 Apr lastSun 2:00
-7:00 NT_YK M%sT 1980
-7:00 Canada M%sT
@@ -1997,13 +2047,19 @@ Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
-4:00 - AST
# Bahamas
+#
+# From Sue Williams (2006-12-07):
+# The Bahamas announced about a month ago that they plan to change their DST
+# rules to sync with the U.S. starting in 2007....
+# http://www.jonesbahamas.com/?c=45&a=10412
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Bahamas 1964 max - Oct lastSun 2:00 0 S
+Rule Bahamas 1964 2006 - Oct lastSun 2:00 0 S
Rule Bahamas 1964 1986 - Apr lastSun 2:00 1:00 D
-Rule Bahamas 1987 max - Apr Sun>=1 2:00 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Nassau -5:09:24 - LMT 1912 Mar 2
- -5:00 Bahamas E%sT
+ -5:00 Bahamas E%sT 1976
+ -5:00 US E%sT
# Barbados
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -2104,6 +2160,12 @@ Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose
# watches should be set back one hour -- going back to 00:00 hours -- returning
# to the normal schedule....
+# From Paul Eggert (2007-03-02):
+# http://www.granma.cubaweb.cu/english/news/art89.html, dated yesterday,
+# 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.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cuba 1928 only - Jun 10 0:00 1:00 D
Rule Cuba 1928 only - Oct 10 0:00 0 S
@@ -2133,8 +2195,10 @@ Rule Cuba 1996 only - Oct 6 0:00s 0 S
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 max - Apr Sun>=1 0:00s 1:00 D
-Rule Cuba 2006 max - 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
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Havana -5:29:28 - LMT 1890
diff --git a/timezone/private.h b/timezone/private.h
index 2837b70c10..d64c724ef6 100644
--- a/timezone/private.h
+++ b/timezone/private.h
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 8.2";
+static char privatehid[] = "@(#)private.h 8.3";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -356,7 +356,7 @@ char *ctime_r P((time_t const *, char *));
#ifndef SECSPERREPEAT
#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)
#endif /* !defined SECSPERREPEAT */
-
+
#ifndef SECSPERREPEAT_BITS
#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */
#endif /* !defined SECSPERREPEAT_BITS */
diff --git a/timezone/southamerica b/timezone/southamerica
index ca6c492f3e..7aec8b6b8b 100644
--- a/timezone/southamerica
+++ b/timezone/southamerica
@@ -1,4 +1,4 @@
-# @(#)southamerica 8.6
+# @(#)southamerica 8.11
# <pre>
# This data is by no means authoritative; if you think you know better,
@@ -714,8 +714,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# (they should have been 1990-09-15 and 1990-09-16 respectively), but
# anyhow it clears up some doubts too.
-# The following data are from <http://www.horaoficial.cl/horaof.htm>
-# (2006-09-20), transcribed by Jesper Norgaard Welen.
+# From Paul Eggert (2006-12-27):
+# The following data for Chile and America/Santiago are from
+# <http://www.horaoficial.cl/horaof.htm> (2006-09-20), transcribed by
+# Jesper Norgaard Welen. The data for Pacific/Easter are from Shanks
+# & Pottenger, except with DST transitions after 1932 cloned from
+# America/Santiago. The pre-1980 Pacific/Easter data are dubious,
+# but we have no other source.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1932 - Sep 1 0:00 1:00 S
@@ -759,9 +764,9 @@ Zone America/Santiago -4:42:46 - LMT 1890
-4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time
-5:00 Chile CL%sT 1947 May 22 # Chile Time
-4:00 Chile CL%sT
-Zone Pacific/Easter -7:17:28 - LMT 1890 # Mataveri
- -7:17:28 - MMT 1932 Sep # Mataveri Mean Time
- -7:00 Chile EAS%sT 1982 Jan 18 21:00 # Easter I Time
+Zone Pacific/Easter -7:17:44 - LMT 1890
+ -7:17:28 - EMT 1932 Sep # Easter Mean Time
+ -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter I Time
-6:00 Chile EAS%sT
#
# Sala y Gomez Island is like Pacific/Easter.
@@ -781,26 +786,33 @@ Zone America/Bogota -4:56:20 - LMT 1884 Mar 13
# Curacao
#
-# From Paul Eggert (2006-03-22):
+# From Paul Eggert (2006-03-22):
# Shanks & Pottenger say that The Bottom and Philipsburg have been at
# -4:00 since standard time was introduced on 1912-03-02; and that
# Kralendijk and Rincon used Kralendijk Mean Time (-4:33:08) from
# 1912-02-02 to 1965-01-01. The former is dubious, since S&P also say
# Saba Island has been like Curacao.
-# This all predates our 1970 cutoff, though.
+# This all predates our 1970 cutoff, though.
#
# By July 2007 Curacao and St Maarten are planned to become
# associated states within the Netherlands, much like Aruba;
# Bonaire, Saba and St Eustatius would become directly part of the
# Netherlands as Kingdom Islands. This won't affect their time zones
# though, as far as we know.
-#
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad
-4:30 - ANT 1965 # Netherlands Antilles Time
-4:00 - AST
# Ecuador
+#
+# From Paul Eggert (2007-03-04):
+# Apparently Ecuador had a failed experiment with DST in 1992.
+# <http://midena.gov.ec/content/view/1261/208/> (2007-02-27) and
+# <http://www.hoy.com.ec/NoticiaNue.asp?row_id=249856> (2006-11-06) both
+# talk about "hora Sixto". Leave this alone for now, as we have no data.
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Guayaquil -5:19:20 - LMT 1890
-5:14:00 - QMT 1931 # Quito Mean Time
diff --git a/timezone/zdump.c b/timezone/zdump.c
index ae4d286b12..6bf540aefd 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -1,4 +1,4 @@
-static char elsieid[] = "@(#)zdump.c 8.2";
+static char elsieid[] = "@(#)zdump.c 8.4";
/*
** This code has been made independent of the rest of the time
diff --git a/timezone/zic.c b/timezone/zic.c
index f7393ea7ba..592dfe5219 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -3,7 +3,7 @@
** 2006-07-17 by Arthur David Olson.
*/
-static char elsieid[] = "@(#)zic.c 8.7";
+static char elsieid[] = "@(#)zic.c 8.11";
#include "private.h"
#include "locale.h"
@@ -2024,7 +2024,7 @@ const int zonecount;
wp = ecpyalloc(_("no POSIX environment variable for zone"));
wp = ecatalloc(wp, " ");
- wp = ecatalloc(wp, zpfirst->z_name);
+ wp = ecatalloc(wp, zpfirst->z_name);
warning(wp);
ifree(wp);
}
@@ -2451,9 +2451,12 @@ register char * cp;
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
- else error(_(
+ else {
+ error(_(
"Odd number of quotation marks"
));
+ exit(1);
+ }
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
@@ -2641,7 +2644,7 @@ wp = _("time zone abbreviation differs from POSIX standard");
static int
mkdirs(argname)
-char * const argname;
+char * argname;
{
register char * name;
register char * cp;
diff --git a/timezone/zone.tab b/timezone/zone.tab
index aecb5bb94c..ace7b575e6 100644
--- a/timezone/zone.tab
+++ b/timezone/zone.tab
@@ -1,4 +1,4 @@
-# @(#)zone.tab 8.5
+# @(#)zone.tab 8.10
#
# TZ zone descriptions
#
@@ -63,7 +63,8 @@ AU -2728+15302 Australia/Brisbane Queensland - most locations
AU -2016+14900 Australia/Lindeman Queensland - Holiday Islands
AU -3455+13835 Australia/Adelaide South Australia
AU -1228+13050 Australia/Darwin Northern Territory
-AU -3157+11551 Australia/Perth Western Australia
+AU -3157+11551 Australia/Perth Western Australia - most locations
+AU -3143+12852 Australia/Eucla Western Australia - Eucla area
AW +1230-06858 America/Aruba
AX +6006+01957 Europe/Mariehamn
AZ +4023+04951 Asia/Baku
@@ -109,8 +110,9 @@ CA +4531-07334 America/Montreal Eastern Time - Quebec - most locations
CA +4339-07923 America/Toronto Eastern Time - Ontario - most locations
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
+CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
-CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut
+CA +744144-0944945 America/Resolute Eastern Time - Resolute, Nunavut
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
@@ -134,7 +136,7 @@ CH +4723+00832 Europe/Zurich
CI +0519-00402 Africa/Abidjan
CK -2114-15946 Pacific/Rarotonga
CL -3327-07040 America/Santiago most locations
-CL -2710-10927 Pacific/Easter Easter Island & Sala y Gomez
+CL -2709-10926 Pacific/Easter Easter Island & Sala y Gomez
CM +0403+00942 Africa/Douala
CN +3114+12128 Asia/Shanghai east China - Beijing, Guangdong, Shanghai, etc.
CN +4545+12641 Asia/Harbin Heilongjiang (except Mohe), Jilin
@@ -159,7 +161,7 @@ EC -0054-08936 Pacific/Galapagos Galapagos Islands
EE +5925+02445 Europe/Tallinn
EG +3003+03115 Africa/Cairo
EH +2709-01312 Africa/El_Aaiun
-ER +1520+03853 Africa/Asmera
+ER +1520+03853 Africa/Asmara
ES +4024-00341 Europe/Madrid mainland
ES +3553-00519 Africa/Ceuta Ceuta & Melilla
ES +2806-01524 Atlantic/Canary Canary Islands
@@ -170,7 +172,7 @@ FK -5142-05751 Atlantic/Stanley
FM +0725+15147 Pacific/Truk Truk (Chuuk) and Yap
FM +0658+15813 Pacific/Ponape Ponape (Pohnpei)
FM +0519+16259 Pacific/Kosrae Kosrae
-FO +6201-00646 Atlantic/Faeroe
+FO +6201-00646 Atlantic/Faroe
FR +4852+00220 Europe/Paris
GA +0023+00927 Africa/Libreville
GB +512830-0001845 Europe/London
@@ -212,7 +214,7 @@ IQ +3321+04425 Asia/Baghdad
IR +3540+05126 Asia/Tehran
IS +6409-02151 Atlantic/Reykjavik
IT +4154+01229 Europe/Rome
-JE +4912-00237 Europe/Jersey
+JE +4912-00207 Europe/Jersey
JM +1800-07648 America/Jamaica
JO +3157+03556 Asia/Amman
JP +353916+1394441 Asia/Tokyo
@@ -247,7 +249,7 @@ LY +3254+01311 Africa/Tripoli
MA +3339-00735 Africa/Casablanca
MC +4342+00723 Europe/Monaco
MD +4700+02850 Europe/Chisinau
-ME +4247+01928 Europe/Podgorica
+ME +4226+01916 Europe/Podgorica
MG -1855+04731 Indian/Antananarivo
MH +0709+17112 Pacific/Majuro most locations
MH +0905+16720 Pacific/Kwajalein Kwajalein
@@ -378,11 +380,12 @@ US +421953-0830245 America/Detroit Eastern Time - Michigan - most locations
US +381515-0854534 America/Kentucky/Louisville Eastern Time - Kentucky - Louisville area
US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County
US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations
-US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County
US +411745-0863730 America/Indiana/Knox Eastern Time - Indiana - Starke County
+US +410305-0863611 America/Indiana/Winamac Eastern Time - Indiana - Pulaski County
+US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County
US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County
US +415100-0873900 America/Chicago Central Time
-US +384038-0873143 America/Indiana/Vincennes Central Time - Indiana - Daviess, Dubois, Knox, Martin, Perry & Pulaski Counties
+US +384038-0873143 America/Indiana/Vincennes Central Time - Indiana - Daviess, Dubois, Knox, Martin & Perry Counties
US +382931-0871643 America/Indiana/Petersburg Central Time - Indiana - Pike County
US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County