From fc2a4f5f837f259c239fbd15911f80ca8c6907e3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 10 Oct 2007 21:00:50 +0000 Subject: Updated to fedora-glibc-20071010T2047 --- ChangeLog | 144 +++++++++++++++- NEWS | 12 +- elf/do-lookup.h | 3 +- fedora/branch.mk | 4 +- fedora/glibc.spec.in | 11 +- include/bits/error.h | 1 + locale/C-time.c | 4 +- locale/programs/ld-time.c | 4 +- localedata/ChangeLog | 36 ++++ localedata/locales/cs_CZ | 2 + localedata/locales/de_DE | 5 +- localedata/locales/en_NG | 289 ++++++++++++++++++++++++++++++++ localedata/locales/en_US | 2 + localedata/locales/fr_FR | 4 + localedata/locales/fur_IT | 2 + localedata/locales/fy_DE | 2 + localedata/locales/hu_HU | 2 + localedata/locales/i18n | 2 + localedata/locales/li_BE | 2 + localedata/locales/li_NL | 2 + localedata/locales/nb_NO | 80 +++++---- localedata/locales/nds_DE | 2 + localedata/locales/nds_NL | 2 + localedata/locales/nn_NO | 74 ++++---- localedata/locales/pl_PL | 2 + localedata/locales/sc_IT | 2 + localedata/locales/sk_SK | 2 + localedata/tst-langinfo.sh | 4 +- login/login_tty.c | 10 +- math/libm-test.inc | 5 +- misc/bits/error.h | 74 ++++++++ misc/error.h | 33 ++-- nptl/ChangeLog | 8 + nptl/sysdeps/pthread/bits/libc-lock.h | 15 +- nptl/tst-initializers1.c | 7 + nscd/connections.c | 26 ++- nscd/nscd_helper.c | 22 ++- posix/glob.c | 6 +- posix/tst-gnuglob.c | 18 +- stdio-common/printf-parse.h | 22 ++- stdio-common/printf-parsemb.c | 34 +--- stdio-common/printf-prs.c | 9 +- stdio-common/vfprintf.c | 15 +- stdlib/Makefile | 2 +- stdlib/msort.c | 276 ++++++++++++++++++++++-------- stdlib/tst-qsort2.c | 89 ++++++++++ string/bits/string2.h | 4 +- sunrpc/svc.c | 23 ++- sysdeps/gnu/netinet/tcp.h | 19 +++ sysdeps/i386/dl-trampoline.S | 5 +- sysdeps/ieee754/dbl-64/e_lgamma_r.c | 7 +- sysdeps/ieee754/flt-32/e_lgammaf_r.c | 7 +- sysdeps/ieee754/ldbl-96/e_lgammal_r.c | 10 +- sysdeps/unix/sysv/linux/Makefile | 3 +- sysdeps/unix/sysv/linux/Versions | 3 + sysdeps/unix/sysv/linux/eventfd.c | 43 +++++ sysdeps/unix/sysv/linux/eventfd_read.c | 28 ++++ sysdeps/unix/sysv/linux/eventfd_write.c | 29 ++++ sysdeps/unix/sysv/linux/signalfd.c | 44 +++++ sysdeps/unix/sysv/linux/sys/eventfd.h | 43 +++++ sysdeps/unix/sysv/linux/sys/signalfd.h | 58 +++++++ sysdeps/x86_64/cacheinfo.c | 8 + timezone/africa | 36 +++- timezone/antarctica | 8 +- timezone/asia | 70 +++++++- timezone/australasia | 109 +++++++----- timezone/europe | 13 +- timezone/leapseconds | 52 +++--- timezone/northamerica | 93 +++++++--- timezone/southamerica | 35 +++- timezone/zic.c | 56 ++++--- timezone/zone.tab | 17 +- wcsmbs/wchar.h | 46 ++--- 73 files changed, 1808 insertions(+), 433 deletions(-) create mode 100644 include/bits/error.h create mode 100644 localedata/locales/en_NG create mode 100644 misc/bits/error.h create mode 100644 stdlib/tst-qsort2.c create mode 100644 sysdeps/unix/sysv/linux/eventfd.c create mode 100644 sysdeps/unix/sysv/linux/eventfd_read.c create mode 100644 sysdeps/unix/sysv/linux/eventfd_write.c create mode 100644 sysdeps/unix/sysv/linux/signalfd.c create mode 100644 sysdeps/unix/sysv/linux/sys/eventfd.h create mode 100644 sysdeps/unix/sysv/linux/sys/signalfd.h diff --git a/ChangeLog b/ChangeLog index cb019c5586..0e81065ae1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,146 @@ -2007-10-03 Jakub Jelinek +2007-10-10 Jakub Jelinek + + * stdio-common/printf-parse.h: Include string.h and wchar.h. + (__find_specwc): Change into __extern_always_inline function. + (__find_specmb): Likewise. Remove ps argument. Use __strchrnul. + (__parse_one_specmb): Remove ps argument. + * stdio-common/vfprintf.c (vfprintf): Remove mbstate variable. + Adjust __find_specmb and __parse_one_specmb callers. + * stdio-common/printf-prs.c (parse_printf_format): Likewise. + * stdio-common/printf-parsemb.c (__find_specwc, __find_specmb): + Removed. + (__parse_one_specmb): Remove ps argument, adjust __find_specmb + caller. + +2007-10-09 Ulrich Drepper + + * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Work around problem + with some Pentium Ds. + +2007-10-08 Ulrich Drepper + + * sysdeps/unix/sysv/linux/eventfd_read.c (eventfd_read): Use + __read not read. + * sysdeps/unix/sysv/linux/eventfd_write.c (eventfd_write): Use + __write not write. + +2007-10-07 Ulrich Drepper + + [BZ #181] + * locale/C-time.c: Set week_1stday data to 19971201. + * locale/programs/ld-time.c (time_finish): Default for + first_workday is Monday. + + [BZ #2633] + * wcsmbs/wchar.h: Move many C99 functions into std namespace. + + [BZ #5103] + * posix/glob.c (glob): Recognize patterns starting \/. + * posix/tst-gnuglob.c (find_file): Handle absolute path names. + (main): Add test for pattern starting \/. + + * misc/error.h: Use __const instead of const. + * misc/bits/error.h: Likewise. + +2007-10-07 Andreas Jaeger + + * include/bits/error.h: New file. + + * misc/bits/error.h (error_at_line): Fix prototype. + +2007-10-06 Ulrich Drepper + + [BZ #3924] + * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix a few + more little bugs in creating the stack frame when pltexit has to + be called. + + * nscd/nscd_helper.c (__nscd_cache_search): Prevent endless loops. + * nscd/connections.c (verify_persistent_db): Recognize circular lists. + + [BZ #4407] + * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Fix *signgamp for -0.0. + * sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise. + * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise. + * math/libm-test.inc: Add test for this case. + + [BZ #5010] + * sunrpc/svc.c (struct svc_callout): Add sc_mapped element. + (svc_register): Initialize sc_mapped. Set to TRUE if call to + map service succeeded. + (svc_is_mapped): New function. + (svc_unregister): Use it before trying to unmap service. + +2007-10-05 Ulrich Drepper + + * timezone/zic.c: Update from tzcode2007h. + + [BZ #5063] + * timezone/africa: Update from tzdata2007h. + * timezone/antarctica: Likewise. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/europe: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timzeone/zone.tab: Likewise. + + [BZ #5104] + * elf/do-lookup.h (do_lookup_x): Don't ignore STT_COMMON symbols. + + [BZ #5113] + * string/bits/string2.h (__strdup): Cast parameters to calloc to + avoid warning with -Wconversion. + (__strndup): Likewise. + Half the patch by Christian Iseli . + + [BZ #5112] + * nscd/connections.c (restart): Don't resync if database is + disabled. Patch mostly by Brian De Wolf . + + * sysdeps/gnu/netinet/tcp.h: Define TCP_MD5SIG, TCP_MD5SIG_MAXKEYLEN, + struct tcp_md5sig. Extend struct tcp_info according to recent kernels. + + * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add eventfd, + evetnfd_read, eventfd_write. + * sysdeps/unix/sysv/linux/eventfd.c: New file. + * sysdeps/unix/sysv/linux/eventfd_read.c: New file. + * sysdeps/unix/sysv/linux/eventfd_write.c: New file. + * sysdeps/unix/sysv/linux/sys/eventfd.h: New file. + * sysdeps/unix/sysv/linux/Versions: Export eventfd, eventfd_read, + eventfd_write for GLIBC_2.7. + + * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add signalfd. + * sysdeps/unix/sysv/linux/signalfd.c: New file. + * sysdeps/unix/sysv/linux/sys/signalfd.h: New file. + * sysdeps/unix/sysv/linux/Versions: Export signalfd for GLIBC_2.7. + +2007-10-04 Jakub Jelinek + + * stdlib/msort.c: Include stdint.h. + (struct msort_param): New type. + (msort_with_tmp): Use struct msort_param pointer for unchanging + parameters. Add optimized handling for several common sizes + and indirect sorting mode. + (qsort): Adjust msort_with_tmp callers. For big S use indirect + sorting. + Suggested by Belazougui Djamel . + + * stdlib/Makefile (tests): Add tst-qsort2. + * stdlib/tst-qsort2.c: New test. + +2007-10-04 Ulrich Drepper + + * login/login_tty.c (login_tty): The Linux kernel can return EBUSY + for dup2 in case another thread races with the current one. Retry + in this case. + + * misc/error.h: Remove support for use outside of libc. We have to + include now. Include if possible. + * misc/bits/error.h: New file. + +2007-10-03 Jakub Jelinek * string/bits/string3.h (memcpy, memmove, mempcpy, memset, bcopy, bzero, strcpy, stpcpy, strncpy, strcat, strncat): Use diff --git a/NEWS b/NEWS index 0c5080025c..82dbdb1202 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 2007-9-19 +GNU C Library NEWS -- history of user-visible changes. 2007-10-5 Copyright (C) 1992-2006, 2007 Free Software Foundation, Inc. See the end for copying conditions. @@ -24,6 +24,9 @@ Version 2.7 * More CPU set manipulation functions. Implemented by Ulrich Drepper. +* New Linux interfaces: signalfd, eventfd, eventfd_read, and eventfd_write. + Implemented by Ulrich Drepper. + * Handle private futexes in the NPTL implementation. Implemented by Jakub Jelinek and Ulrich Drepper. @@ -34,6 +37,13 @@ Version 2.7 * SHA-256 and SHA-512 based password encryption. Implemented by Ulrich Drepper. + +* New locales: ber_DZ, ber_MA, en_NG, fil_PH, fur_IT, fy_DE, ha_NG, ig_NG, + ik_CA, iu_CA, li_BE, li_NL, nds_DE, nds_NL, pap_AN, sc_IT, tk_TM, ug_CN, + yo_NG. + ++ New iconv modules: MAC-CENTRALEUROPE, ISO-8859-9E, KOI8-RU. + Implemented by Ulrich Drepper. Version 2.6 diff --git a/elf/do-lookup.h b/elf/do-lookup.h index e17d463526..ebb9ed5b47 100644 --- a/elf/do-lookup.h +++ b/elf/do-lookup.h @@ -87,8 +87,9 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, return NULL; if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC + && ELFW(ST_TYPE) (sym->st_info) != STT_COMMON && ELFW(ST_TYPE) (sym->st_info) != STT_TLS, 0)) - /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC + /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, and STT_COMMON entries (and STT_TLS if TLS is supported) since these are no code/data definitions. */ return NULL; diff --git a/fedora/branch.mk b/fedora/branch.mk index 29da99837f..1f8d9eeac1 100644 --- a/fedora/branch.mk +++ b/fedora/branch.mk @@ -3,5 +3,5 @@ glibc-branch := fedora glibc-base := HEAD DIST_BRANCH := devel COLLECTION := dist-f8 -fedora-sync-date := 2007-10-03 19:08 UTC -fedora-sync-tag := fedora-glibc-20071003T1908 +fedora-sync-date := 2007-10-10 20:47 UTC +fedora-sync-tag := fedora-glibc-20071010T2047 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 7610eabdc0..701f107975 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 17 +%define glibcrelease 18 %define run_glibc_tests 1 %define auxarches i586 i686 athlon sparcv9v sparc64v alphaev6 %define xenarches i686 athlon @@ -1010,6 +1010,15 @@ rm -f *.filelist* %endif %changelog +* Wed Oct 10 2007 Jakub Jelinek 2.6.90-18 +- add signalfd, eventfd, eventfd_read, eventfd_write +- qsort speedups +- workaround for cpuid bugs (#324081) +- make sure gettext's conversion_lock is initialized even if + program isn't linked against libpthread.so.0, only dlopens it (#321761) +- misc fixes (BZ#5112, BZ#5113, BZ#5104, BZ#5063, BZ#5010, BZ#4407, + BZ#3924, BZ#5103, BZ#2633, BZ#181, BZ#73, #321901) + * Wed Oct 3 2007 Jakub Jelinek 2.6.90-17 - fix {,v}swprintf with -D_FORTIFY_SOURCE=1 -mlong-double-64 on ppc*/s390*/sparc* - strcoll fixes diff --git a/include/bits/error.h b/include/bits/error.h new file mode 100644 index 0000000000..c2c7c9b710 --- /dev/null +++ b/include/bits/error.h @@ -0,0 +1 @@ +#include "../../misc/bits/error.h" diff --git a/locale/C-time.c b/locale/C-time.c index 9047587e4a..a9275d9ebe 100644 --- a/locale/C-time.c +++ b/locale/C-time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2000, 2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995-2002, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -134,7 +134,7 @@ const struct locale_data _nl_C_LC_TIME attribute_hidden = { .wstr = (const uint32_t *) L"" }, { .wstr = (const uint32_t *) L"" }, { .string = "\7" }, - { .word = 19971130 }, + { .word = 19971201 }, { .string = "\4" }, { .string = "\7" }, { .string = "\1" }, diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index 30c13533c2..f040c93474 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -508,7 +508,7 @@ No definition for %s category found"), "LC_TIME")); if (time->first_workday == '\0') /* The definition does not specify this so the default is used. */ - time->first_workday = 1; + time->first_workday = 2; else if (time->first_workday > time->week_ndays) WITH_CUR_LOCALE (error (0, 0, _("\ %s: values for field `%s' must not be larger than %d"), diff --git a/localedata/ChangeLog b/localedata/ChangeLog index db32361702..a14908d5a2 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,39 @@ +2007-10-10 Jakub Jelinek + + * locales/en_US: Add first_weekday and first_workday. + * locales/cs_CZ: Likewise. + * locales/fur_IT: Likewise. + * locales/fy_DE: Likewise. + * locales/hu_HU: Likewise. + * locales/i18n: Likewise. + * locales/li_BE: Likewise. + * locales/li_NL: Likewise. + * locales/nds_DE: Likewise. + * locales/nds_NL: Likewise. + * locales/pl_PL: Likewise. + * locales/sc_IT: Likewise. + * locales/sk_SK: Likewise. + +2007-10-09 Ulrich Drepper + + * locales/de_DE: Set first week day to Monday. + * locales/fr_FR: Likewise. + +2007-10-07 Ulrich Drepper + + [BZ #73] + * locales/nb_NO: Update time information, collation, thousands + separator. + * locales/nn_NO: Likewise. + +2007-10-04 Ulrich Drepper + + * locales/en_NG: New file. + +2007-10-04 Jakub Jelinek + + * tst-langinfo.sh: Update expected THOUSEP for fr_FR. + 2007-10-02 Ulrich Drepper * charmaps/UTF-8: Fix U06FF definition. Remove double U074A diff --git a/localedata/locales/cs_CZ b/localedata/locales/cs_CZ index 059776a054..cb2323123c 100644 --- a/localedata/locales/cs_CZ +++ b/localedata/locales/cs_CZ @@ -2439,6 +2439,8 @@ abmon "";/ % "" week 7;19971201;4 +first_weekday 1 +first_workday 1 d_t_fmt "" diff --git a/localedata/locales/de_DE b/localedata/locales/de_DE index 8c6fe41eb2..1298854b01 100644 --- a/localedata/locales/de_DE +++ b/localedata/locales/de_DE @@ -118,7 +118,6 @@ day "";/ "";/ "";/ "" -week 7;19971201;4 abmon "";"";/ "";"";/ "";"";/ @@ -153,6 +152,10 @@ t_fmt_ampm "" date_fmt "/ / " + +week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_MESSAGES diff --git a/localedata/locales/en_NG b/localedata/locales/en_NG new file mode 100644 index 0000000000..569283b906 --- /dev/null +++ b/localedata/locales/en_NG @@ -0,0 +1,289 @@ +escape_char / +comment_char % + +% English language locale for Nigeria +% Language: en +% Territory: NG +% Revision: 0.2 +% Date: 2006-02-01 +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. +% +% adapted from en_ZA; should be checked and verified + +LC_IDENTIFICATION +title "English locale for Nigeria" +source "" +address "" +contact "" +email "" +tel "" +fax "" +language "English" +territory "Nigeria" +revision "0.2" +date "2006-02-01" +% +category "en_NG:2003";LC_IDENTIFICATION +category "en_NG:2000";LC_CTYPE +category "en_NG:2000";LC_COLLATE +category "en_NG:2003";LC_TIME +category "en_NG:2000";LC_NUMERIC +category "en_NG:2000";LC_MONETARY +category "en_NG:2003";LC_MESSAGES +category "en_NG:2000";LC_PAPER +category "en_NG:2000";LC_MEASUREMENT +category "en_NG:2003";LC_NAME +category "en_NG:2003";LC_ADDRESS +category "en_NG:2003";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "i18n" + +translit_start +include "translit_combining";"" +translit_end +END LC_CTYPE + +LC_COLLATE +copy "iso14651_t1" +END LC_COLLATE + +% FIXME +LC_MONETARY +% "NGN " +int_curr_symbol "" +% "₦" +currency_symbol "" +% "." +mon_decimal_point "" +% "," +mon_thousands_sep "" +mon_grouping 3;3 +positive_sign "" +% "-" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 1 +p_sep_by_space 0 +n_cs_precedes 1 +n_sep_by_space 0 +p_sign_posn 1 +n_sign_posn 1 +END LC_MONETARY + +% FIXME +LC_NUMERIC +% "." +decimal_point "" +% "," +thousands_sep "" +grouping 3;3 +END LC_NUMERIC + +LC_TIME +% abday - The abbreviations for the week days: +% - Sun, Mon, Tue, Wed, Thu, Fri, Sat +abday "";"";/ + "";"";/ + "";"";/ + "" + +% day - The full names of the week days: +% - Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% abmon - The abbreviations for the months +% - Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" + +% mon - The full names of the months - +% - January, February, March, April, May, June +% July, August, September, October, November, December +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + +% Abreviated date and time representation to be referenced by the "%c" field descriptor - +% +% "%a" (short weekday name), +% "%d" (day of month as a decimal number), +% "%b" (short month name), +% "%Y" (year with century as a decimal number), +% "%T" (24-hour clock time in format HH:MM:SS), +% "%Z" (Time zone name) +d_t_fmt "" + +% Date representation to be referenced by the "%x" field descriptor - +% "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000). +d_fmt "" + +% Time representation to be referenced by the "%X" field descriptor - +% "%T" (24-hour clock time in format HH:MM:SS) +t_fmt "" + +% Define representation of ante meridiem and post meridiem strings - +% The "" mean default to "AM" and "PM". +am_pm "";"" + +% Define time representation in 12-hour format with "am_pm", to be referenced by the "%r" +% The "" means that this format is not supported. +t_fmt_ampm "" + +% Date representation not described in ISO/IEC 14652. Comes out as - +% "%a %b %e %H:%M:%S %Z %Y" which is default "date" command output +% +% %a - abbreviated weekday name, +% %b - abreviated month name, +% %e - day of month as a decimal number with leading space (1 to 31), +% %H - hour (24-hour clock) as a decimal number (00 to 23), +% %M - minute as a decimal number (00 to 59), +% %S - seconds as a decimal number (00 to 59), +% %Z - time-zone name, +% %Y - year with century as a decimal number,e.g. 2001. +date_fmt "/ +/ +" +END LC_TIME + +LC_MESSAGES +% The affirmative response - +% "^[yY]" +yesexpr "" + +% The negative response - +% "^[nN]" +noexpr "" +END LC_MESSAGES + +LC_PAPER +copy "en_DK" +END LC_PAPER + +% FIXME +LC_TELEPHONE +% Representation of telephone number for international use - +% "+%c %a %l", which is +% "+%c - country code", +% "%a - area code without the prefix (often 0)", +% "%l local number". +tel_int_fmt "/ +" + +% Represntation of telephone number for domestic use - +% "(%A) %l", which is +% %A - area code with national prefix +% %l - local number". +tel_dom_fmt "" + +% Prefix for making international calls +% "009" +int_select "" + +% International dialing code +% "234" +int_prefix "" +END LC_TELEPHONE + +LC_MEASUREMENT +copy "en_DK" +END LC_MEASUREMENT + +LC_NAME +copy "en_DK" +END LC_NAME + +% FIXME +LC_ADDRESS +% Representation of postal addresses (minus the addressee's name) in South +% Africa. (Ignored for now) +% "%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N", which gives - +% +% "firm name", +% "end of line", +% "C/O address", +% "end of line", +% "department name", +% "Building name", +% "end of line", +% "street or block name", +% "space", +% "house number or designation", +% "space", +% "floor number", +% "space", +% "room number, door designation", +% "end of line", +% "postal code", +% "space", +% "town, city", +% "end of line", +% "country designation for the keyword", +% "end of line +postal_fmt "/ +/ +/ +/ +" + +% Country name in English - "Nigeria" +country_name "" + +% Language name in English - "English" +lang_name "" + +% CEPT MAILCODES are suggested +% Alternatively use the code found on your countries postal item tracking number +% "NG"? +%country_post "" + +% UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic +% http://www.unece.org/trans/conventn/Distsigns_Sept2003.pdf +% "WAN" +country_car "" + +% ISO 2108 +% http://www.isbn-international.org/ +country_isbn 978 + +% ISO 639 language abbreviations: +% 639-1 2 letter, 639-2 3 letter terminology +% http://www.loc.gov/standards/iso639-2/englagn.html +% "en", "eng" +lang_ab "" +lang_term "" +lang_lib "" + +% ISO 3166 country number and 2 and 3 letter abreviations +% http://www.unicode.org/onlinedat/countries.html +% "NG", "NGA" +country_ab2 "" +country_ab3 "" +country_num 566 + +END LC_ADDRESS diff --git a/localedata/locales/en_US b/localedata/locales/en_US index 1a97aa7aa5..38425e815e 100644 --- a/localedata/locales/en_US +++ b/localedata/locales/en_US @@ -82,6 +82,8 @@ day "";/ "" week 7;19971130;7 +first_weekday 1 +first_workday 2 abmon "";"";/ "";"";/ "";"";/ diff --git a/localedata/locales/fr_FR b/localedata/locales/fr_FR index a9845fda11..8bae005657 100644 --- a/localedata/locales/fr_FR +++ b/localedata/locales/fr_FR @@ -129,6 +129,10 @@ t_fmt_ampm "" date_fmt "/ / " + +week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_PAPER diff --git a/localedata/locales/fur_IT b/localedata/locales/fur_IT index f9c4bd3fc9..35da38ca9d 100644 --- a/localedata/locales/fur_IT +++ b/localedata/locales/fur_IT @@ -111,6 +111,8 @@ date_fmt "/ / " week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_PAPER diff --git a/localedata/locales/fy_DE b/localedata/locales/fy_DE index ec37f2f770..cad33aa515 100644 --- a/localedata/locales/fy_DE +++ b/localedata/locales/fy_DE @@ -128,4 +128,6 @@ t_fmt "" am_pm "";"" t_fmt_ampm "" week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/locales/hu_HU b/localedata/locales/hu_HU index ce878e9d7d..95be95b0a3 100644 --- a/localedata/locales/hu_HU +++ b/localedata/locales/hu_HU @@ -521,6 +521,8 @@ t_fmt_ampm "" date_fmt "/ " week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_PAPER diff --git a/localedata/locales/i18n b/localedata/locales/i18n index ce16afbe0b..93ffe90e7e 100644 --- a/localedata/locales/i18n +++ b/localedata/locales/i18n @@ -1943,6 +1943,8 @@ LC_TIME abday "";"";"";"";"";"";"" day "";"";"";"";"";"";"" week 7;19971201;4 +first_weekday 1 +first_workday 1 abmon "";"";"";"";/ "";"";"";"";/ "";"";"";"" diff --git a/localedata/locales/li_BE b/localedata/locales/li_BE index 7de99170c1..f0a6fc19ff 100644 --- a/localedata/locales/li_BE +++ b/localedata/locales/li_BE @@ -127,4 +127,6 @@ t_fmt "" am_pm "";"" t_fmt_ampm "" week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/locales/li_NL b/localedata/locales/li_NL index 016e283cdf..3f4d021f47 100644 --- a/localedata/locales/li_NL +++ b/localedata/locales/li_NL @@ -128,4 +128,6 @@ t_fmt "" am_pm "";"" t_fmt_ampm "" week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/locales/nb_NO b/localedata/locales/nb_NO index 9540cfa04a..6638272c90 100644 --- a/localedata/locales/nb_NO +++ b/localedata/locales/nb_NO @@ -15,15 +15,13 @@ comment_char % % Date: 1996-10-15 % Application: general % Users: general -% Repertoiremap: mnemonic.ds -% Charset: ISO-8859-1 % Distribution and use is free, also % for commercial purposes. LC_IDENTIFICATION title "Norwegian (Bokmal) locale for Norway" source "Norsk Standardiseringsforbund" -address "University Library,, Drammensveien 41, N-9242 Oslo, Norge" +address "University Library, Drammensveien 41, N-9242 Oslo, Norge" contact "" email "bug-glibc-locales@gnu.org" tel "" @@ -66,6 +64,9 @@ reorder-after +reorder-after + + reorder-after @@ -73,31 +74,33 @@ reorder-after reorder-after ;;;IGNORE - ;;;IGNORE ;;;IGNORE +reorder-after + ;;;IGNORE ;;;IGNORE reorder-after ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE - ;;;IGNORE ;;;IGNORE ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE ;;;IGNORE ;;;IGNORE @@ -105,15 +108,14 @@ reorder-after % removed from latest iso14651 tables. reorder-after "";"";"";IGNORE +reorder-after "";"";"";IGNORE -reorder-after - - reorder-after ;;;IGNORE - ;;;IGNORE ;;;IGNORE +reorder-after + ;;;IGNORE ;;;IGNORE reorder-end @@ -132,7 +134,7 @@ LC_MONETARY int_curr_symbol "" currency_symbol "" mon_decimal_point "" -mon_thousands_sep "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" @@ -148,15 +150,15 @@ END LC_MONETARY LC_NUMERIC decimal_point "" -thousands_sep "" +thousands_sep "" grouping 3;3 END LC_NUMERIC LC_TIME -abday "";"";/ - "";"";/ - "";"";/ - "" +abday "";"";/ + "";"";/ + "";"";/ + "" day "";/ "";/ "";/ @@ -164,12 +166,12 @@ day "";/ "";/ "";/ "" -abmon "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" mon "";/ "";/ "";/ @@ -183,14 +185,22 @@ mon "";/ "";/ "" % usual date representation -d_t_fmt "" -d_fmt "" -t_fmt "" +% %a %d. %b %Y kl. %H.%M %z +d_t_fmt "/ +/ +" +% %d. %b %Y +d_fmt "" +% kl. %H.%M %z +t_fmt "/ +" am_pm "";"" t_fmt_ampm "" -date_fmt "/ -/ -" +% %a %d. %b %H:%M:%S %z %Y +date_fmt "/ +/ +" + week 7;19971201;4 first_weekday 1 first_workday 1 diff --git a/localedata/locales/nds_DE b/localedata/locales/nds_DE index 179f052804..10310cf071 100644 --- a/localedata/locales/nds_DE +++ b/localedata/locales/nds_DE @@ -126,4 +126,6 @@ t_fmt "" am_pm "";"" t_fmt_ampm "" week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/locales/nds_NL b/localedata/locales/nds_NL index aaccb68451..54792ca658 100644 --- a/localedata/locales/nds_NL +++ b/localedata/locales/nds_NL @@ -125,4 +125,6 @@ t_fmt "" am_pm "";"" t_fmt_ampm "" week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/locales/nn_NO b/localedata/locales/nn_NO index af9ce4de2e..ea223398bf 100644 --- a/localedata/locales/nn_NO +++ b/localedata/locales/nn_NO @@ -75,27 +75,27 @@ LC_TIME % for IBM Class for Unicode/Java % % Abbreviated weekday names (%a) -abday "";"";/ - "";"";/ - "";"";/ - "" +abday "";"";/ + "";"";/ + "";"";/ + "" % % Full weekday names (%A) -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" +day " ";/ + " ";/ + " ";/ + " ";/ + " ";/ + " ";/ + " " % % Abbreviated month names (%b) -abmon "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" % % Full month names (%B) mon "";/ @@ -110,32 +110,24 @@ mon "";/ "";/ "";/ "" -% -% Equivalent of AM PM -am_pm "";"" -% -% Appropriate date and time representation -% %d. %b %Ykl %H.%M %Z -d_t_fmt "/ -/ -" -% -% Appropriate date representation + +% usual date representation +% %a %d. %b %Y kl. %H.%M %z +d_t_fmt "/ +/ +" % %d. %b %Y -d_fmt "" -% -% Appropriate time representation -% kl %H.%M %Z -t_fmt "/ -" -% -% Appropriate 12 h time representation (%r) +d_fmt "" +% kl. %H.%M %z +t_fmt "/ +" +am_pm "";"" t_fmt_ampm "" -% -% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" -date_fmt "/ -/ -" +% %a %d. %b %H:%M:%S %z %Y +date_fmt "/ +/ +" + week 7;19971201;4 first_weekday 1 first_workday 1 diff --git a/localedata/locales/pl_PL b/localedata/locales/pl_PL index 213284f0d6..2f17b364f4 100644 --- a/localedata/locales/pl_PL +++ b/localedata/locales/pl_PL @@ -2199,6 +2199,8 @@ date_fmt "/ / " week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_PAPER diff --git a/localedata/locales/sc_IT b/localedata/locales/sc_IT index dd38cac62d..0309d56f63 100644 --- a/localedata/locales/sc_IT +++ b/localedata/locales/sc_IT @@ -111,6 +111,8 @@ date_fmt "/ / " week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME LC_PAPER diff --git a/localedata/locales/sk_SK b/localedata/locales/sk_SK index afcca128b8..57e832751a 100644 --- a/localedata/locales/sk_SK +++ b/localedata/locales/sk_SK @@ -184,6 +184,8 @@ date_fmt "/ " week 7;19971201;4 +first_weekday 1 +first_workday 1 END LC_TIME diff --git a/localedata/tst-langinfo.sh b/localedata/tst-langinfo.sh index 412102613f..375352d339 100755 --- a/localedata/tst-langinfo.sh +++ b/localedata/tst-langinfo.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test nl_langinfo. -# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2003, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # @@ -287,7 +287,7 @@ fr_FR.ISO-8859-1 D_T_FMT "%a %d %b %Y %T %Z" fr_FR.ISO-8859-1 D_FMT "%d.%m.%Y" fr_FR.ISO-8859-1 T_FMT "%T" fr_FR.ISO-8859-1 RADIXCHAR , -fr_FR.ISO-8859-1 THOUSEP "" +fr_FR.ISO-8859-1 THOUSEP " " fr_FR.ISO-8859-1 YESEXPR ^[oOyY].* fr_FR.ISO-8859-1 NOEXPR ^[nN].* ja_JP.EUC-JP ABDAY_1 Æü diff --git a/login/login_tty.c b/login/login_tty.c index 1bb1703267..2ba276d4a9 100644 --- a/login/login_tty.c +++ b/login/login_tty.c @@ -31,6 +31,7 @@ static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#include #include #include #include @@ -63,9 +64,12 @@ login_tty(fd) } } #endif - (void) dup2(fd, 0); - (void) dup2(fd, 1); - (void) dup2(fd, 2); + while (dup2(fd, 0) == -1 && errno == EBUSY) + ; + while (dup2(fd, 1) == -1 && errno == EBUSY) + ; + while (dup2(fd, 2) == -1 && errno == EBUSY) + ; if (fd > 2) (void) close(fd); return (0); diff --git a/math/libm-test.inc b/math/libm-test.inc index 81dd364f77..da68d40bb4 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1997-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1997. @@ -3221,6 +3221,9 @@ lgamma_test (void) TEST_f_f (lgamma, plus_infty, plus_infty); TEST_f_f (lgamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); + check_int ("signgam for lgamma(0) == 1", signgam, 1, 0, 0, 0); + TEST_f_f (lgamma, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION); + check_int ("signgam for lgamma(-0) == -1", signgam, -1, 0, 0, 0); TEST_f_f (lgamma, nan_value, nan_value); /* lgamma (x) == +inf plus divide by zero exception for integer x <= 0. */ diff --git a/misc/bits/error.h b/misc/bits/error.h new file mode 100644 index 0000000000..799a3f18bf --- /dev/null +++ b/misc/bits/error.h @@ -0,0 +1,74 @@ +/* Specializations for error functions. + Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _ERROR_H +# error "Never include directly; use instead." +#endif + + +extern void __REDIRECT (__error_alias, (int __status, int __errnum, + __const char *__format, ...), + error) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern void __REDIRECT (__error_noreturn, (int __status, int __errnum, + __const char *__format, ...), + error) + __attribute__ ((__noreturn__, __format__ (__printf__, 3, 4))); + + +/* If we know the function will never return make sure the compiler + realizes that, too. */ +__extern_always_inline void +error (int __status, int __errnum, __const char *__format, ...) +{ + if (__builtin_constant_p (__status) && __status != 0) + __error_noreturn (__status, __errnum, __format, __va_arg_pack ()); + else + __error_alias (__status, __errnum, __format, __va_arg_pack ()); +} + + +extern void __REDIRECT (__error_at_line_alias, (int __status, int __errnum, + __const char *__fname, + unsigned int __line, + __const char *__format, ...), + error_at_line) + __attribute__ ((__format__ (__printf__, 5, 6))); +extern void __REDIRECT (__error_at_line_noreturn, (int __status, int __errnum, + __const char *__fname, + unsigned int __line, + __const char *__format, + ...), + error_at_line) + __attribute__ ((__noreturn__, __format__ (__printf__, 5, 6))); + + +/* If we know the function will never return make sure the compiler + realizes that, too. */ +__extern_always_inline void +error_at_line (int __status, int __errnum, __const char *__fname, + unsigned int __line,__const char *__format, ...) +{ + if (__builtin_constant_p (__status) && __status != 0) + __error_at_line_noreturn (__status, __errnum, __fname, __line, __format, + __va_arg_pack ()); + else + __error_at_line_alias (__status, __errnum, __fname, __line, + __format, __va_arg_pack ()); +} diff --git a/misc/error.h b/misc/error.h index f25005b0e8..00321e4c3d 100644 --- a/misc/error.h +++ b/misc/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,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 @@ -20,32 +20,20 @@ #ifndef _ERROR_H #define _ERROR_H 1 -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ -# define __attribute__(Spec) /* empty */ -# endif -/* The __-protected variants of `format' and `printf' attributes - are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __format__ format -# define __printf__ printf -# endif -#endif +#include -#ifdef __cplusplus -extern "C" { -#endif + +__BEGIN_DECLS /* Print a message with `fprintf (stderr, FORMAT, ...)'; if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ -extern void error (int __status, int __errnum, const char *__format, ...) +extern void error (int __status, int __errnum, __const char *__format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); -extern void error_at_line (int __status, int __errnum, const char *__fname, - unsigned int __lineno, const char *__format, ...) +extern void error_at_line (int __status, int __errnum, __const char *__fname, + unsigned int __lineno, __const char *__format, ...) __attribute__ ((__format__ (__printf__, 5, 6))); /* If NULL, error will flush stdout, then print on stderr the program @@ -60,8 +48,11 @@ extern unsigned int error_message_count; variable controls whether this mode is selected or not. */ extern int error_one_per_line; -#ifdef __cplusplus -} + +#if defined __extern_always_inline && defined __va_arg_pack +# include #endif +__END_DECLS + #endif /* error.h */ diff --git a/nptl/ChangeLog b/nptl/ChangeLog index d7cdd540a1..a5bce5f682 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,11 @@ +2007-10-10 Jakub Jelinek + + * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of + libc.so just clear NAME. + (__libc_rwlock_fini): Nop inside of libc.so. + * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is + all zeros. + 2007-09-02 Ulrich Drepper * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S diff --git a/nptl/sysdeps/pthread/bits/libc-lock.h b/nptl/sysdeps/pthread/bits/libc-lock.h index 45eba06133..a597f3b5a6 100644 --- a/nptl/sysdeps/pthread/bits/libc-lock.h +++ b/nptl/sysdeps/pthread/bits/libc-lock.h @@ -172,8 +172,15 @@ typedef pthread_key_t __libc_key_t; # define __libc_lock_init(NAME) \ __libc_maybe_call (__pthread_mutex_init, (&(NAME), NULL), 0) #endif -#define __libc_rwlock_init(NAME) \ +#if defined SHARED && !defined NOT_IN_libc +/* ((NAME) = (__libc_rwlock_t) PTHREAD_RWLOCK_INITIALIZER, 0) is + inefficient. */ +# define __libc_rwlock_init(NAME) \ + (__builtin_memset (&(NAME), '\0', sizeof (NAME)), 0) +#else +# define __libc_rwlock_init(NAME) \ __libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0) +#endif /* Same as last but this time we initialize a recursive mutex. */ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) @@ -214,8 +221,12 @@ typedef pthread_key_t __libc_key_t; # define __libc_lock_fini(NAME) \ __libc_maybe_call (__pthread_mutex_destroy, (&(NAME)), 0) #endif -#define __libc_rwlock_fini(NAME) \ +#if defined SHARED && !defined NOT_IN_libc +# define __libc_rwlock_fini(NAME) ((void) 0) +#else +# define __libc_rwlock_fini(NAME) \ __libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0) +#endif /* Finalize recursive named lock. */ #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) diff --git a/nptl/tst-initializers1.c b/nptl/tst-initializers1.c index 9036e6eac3..d30e885e08 100644 --- a/nptl/tst-initializers1.c +++ b/nptl/tst-initializers1.c @@ -47,5 +47,12 @@ main (void) if (rwl_writer.__data.__flags != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) return 6; + /* __libc_rwlock_init definition for libc.so + relies on PTHREAD_RWLOCK_INITIALIZER being all zeros. If + that ever changes, needs updating. */ + size_t i; + for (i = 0; i < sizeof (rwl_normal); i++) + if (((char *) &rwl_normal)[i] != '\0') + return 7; return 0; } diff --git a/nscd/connections.c b/nscd/connections.c index 72a6f3419d..89a1ea4967 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -379,7 +379,9 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr) nscd_ssize_t he_cnt = 0; for (nscd_ssize_t cnt = 0; cnt < head->module; ++cnt) { - ref_t work = head->array[cnt]; + ref_t trail = head->array[cnt]; + ref_t work = trail; + int tick = 0; while (work != ENDREF) { @@ -438,6 +440,13 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr) } work = here->next; + + if (work == trail) + /* A circular list, this must not happen. */ + goto fail; + if (tick) + trail = ((struct hashentry *) (data + trail))->next; + tick = 1 - tick; } } @@ -1285,14 +1294,15 @@ cannot change to old working directory: %s; disabling paranoia mode"), /* Synchronize memory. */ for (int cnt = 0; cnt < lastdb; ++cnt) - { - /* Make sure nobody keeps using the database. */ - dbs[cnt].head->timestamp = 0; + if (!dbs[cnt].enabled) + { + /* Make sure nobody keeps using the database. */ + dbs[cnt].head->timestamp = 0; - if (dbs[cnt].persistent) - // XXX async OK? - msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC); - } + if (dbs[cnt].persistent) + // XXX async OK? + msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC); + } /* The preparations are done. */ execv ("/proc/self/exe", argv); diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 5f3d54efcf..6718d922f3 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -416,7 +416,10 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module; size_t datasize = mapped->datasize; - ref_t work = mapped->head->array[hash]; + ref_t trail = mapped->head->array[hash]; + ref_t work = trail; + int tick = 0; + while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) { struct hashentry *here = (struct hashentry *) (mapped->data + work); @@ -454,6 +457,23 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, } work = here->next; + /* Prevent endless loops. This should never happen but perhaps + the database got corrupted, accidentally or deliberately. */ + if (work == trail) + break; + if (tick) + { + struct hashentry *trailelem; + trailelem = (struct hashentry *) (mapped->data + trail); + +#ifndef _STRING_ARCH_unaligned + /* We have to redo the checks. Maybe the data changed. */ + if ((uintptr_t) trailelem & (__alignof__ (*trailelem) - 1)) + return NULL; +#endif + trail = trailelem->next; + } + tick = 1 - tick; } return NULL; diff --git a/posix/glob.c b/posix/glob.c index 6d8a891340..d6a1a4a2d1 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -454,9 +454,11 @@ glob (pattern, flags, errfunc, pglob) dirlen = 0; } } - else if (filename == pattern) + else if (filename == pattern + || (filename == pattern + 1 && pattern[0] == '\\' + && (flags & GLOB_NOESCAPE) == 0)) { - /* "/pattern". */ + /* "/pattern" or "\\/pattern". */ dirname = "/"; dirlen = 1; ++filename; diff --git a/posix/tst-gnuglob.c b/posix/tst-gnuglob.c index 72f3fa4a3e..95bfbae641 100644 --- a/posix/tst-gnuglob.c +++ b/posix/tst-gnuglob.c @@ -1,6 +1,6 @@ /* Test the GNU extensions in glob which allow the user to provide callbacks for the filesystem access functions. - Copyright (C) 2001-2002 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2001. @@ -103,6 +103,16 @@ find_file (const char *s) int level = 1; long int idx = 0; + while (s[0] == '/') + { + if (s[1] == '\0') + { + s = "."; + break; + } + ++s; + } + if (strcmp (s, ".") == 0) return 0; @@ -439,6 +449,12 @@ main (void) "dir2lev1/dir1lev2/.dir", "dir2lev1/dir1lev2/.foo"); + test ("\\/*", GLOB_ALTDIRFUNC, + "/dir1lev1", + "/dir2lev1", + "/file1lev1", + "/file2lev1"); + globfree (&gl); return result; diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h index aa49c7a642..f6ad71cd3b 100644 --- a/stdio-common/printf-parse.h +++ b/stdio-common/printf-parse.h @@ -1,5 +1,6 @@ /* Internal header for parsing printf format strings. - Copyright (C) 1995-1999, 2000, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2002, 2003, 2007 + Free Software Foundation, Inc. This file is part of th GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +21,8 @@ #include #include #include +#include +#include struct printf_spec @@ -86,11 +89,17 @@ extern printf_function **__printf_function_table attribute_hidden; /* Find the next spec in FORMAT, or the end of the string. Returns a pointer into FORMAT, to a '%' or a '\0'. */ -extern const unsigned char *__find_specmb (const UCHAR_T *format, - mbstate_t *ps) attribute_hidden; +__extern_always_inline const unsigned char * +__find_specmb (const unsigned char *format) +{ + return (const unsigned char *) __strchrnul ((const char *) format, '%'); +} -extern const unsigned int *__find_specwc (const UCHAR_T *format) - attribute_hidden; +__extern_always_inline const unsigned int * +__find_specwc (const unsigned int *format) +{ + return (const unsigned int *) __wcschrnul ((const wchar_t *) format, L'%'); +} /* FORMAT must point to a '%' at the beginning of a spec. Fills in *SPEC @@ -100,8 +109,7 @@ extern const unsigned int *__find_specwc (const UCHAR_T *format) remains the highest argument index used. */ extern size_t __parse_one_specmb (const unsigned char *format, size_t posn, struct printf_spec *spec, - size_t *max_ref_arg, mbstate_t *ps) - attribute_hidden; + size_t *max_ref_arg) attribute_hidden; extern size_t __parse_one_specwc (const unsigned int *format, size_t posn, struct printf_spec *spec, diff --git a/stdio-common/printf-parsemb.c b/stdio-common/printf-parsemb.c index 2f21fc6365..da6fd3edb0 100644 --- a/stdio-common/printf-parsemb.c +++ b/stdio-common/printf-parsemb.c @@ -46,35 +46,6 @@ -/* Find the next spec in FORMAT, or the end of the string. Returns - a pointer into FORMAT, to a '%' or a '\0'. */ -const UCHAR_T * -#ifdef COMPILE_WPRINTF -__find_specwc (const UCHAR_T *format) -#else -__find_specmb (const UCHAR_T *format, mbstate_t *ps) -#endif -{ -#ifdef COMPILE_WPRINTF - return (const UCHAR_T *) __wcschrnul ((const CHAR_T *) format, L'%'); -#else - while (*format != L_('\0') && *format != L_('%')) - { - int len; - - /* Remove any hints of a wrong encoding. */ - ps->__count = 0; - if (! isascii (*format) - && (len = __mbrlen ((const CHAR_T *) format, MB_CUR_MAX, ps)) > 0) - format += len; - else - ++format; - } - return format; -#endif -} - - /* FORMAT must point to a '%' at the beginning of a spec. Fills in *SPEC with the parsed details. POSN is the number of arguments already consumed. At most MAXTYPES - POSN types are filled in TYPES. Return @@ -87,8 +58,7 @@ __parse_one_specwc (const UCHAR_T *format, size_t posn, struct printf_spec *spec, size_t *max_ref_arg) #else __parse_one_specmb (const UCHAR_T *format, size_t posn, - struct printf_spec *spec, size_t *max_ref_arg, - mbstate_t *ps) + struct printf_spec *spec, size_t *max_ref_arg) #endif { unsigned int n; @@ -403,7 +373,7 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn, #ifdef COMPILE_WPRINTF spec->next_fmt = __find_specwc (format); #else - spec->next_fmt = __find_specmb (format, ps); + spec->next_fmt = __find_specmb (format); #endif } diff --git a/stdio-common/printf-prs.c b/stdio-common/printf-prs.c index 015b01f1ed..aabc9ed85a 100644 --- a/stdio-common/printf-prs.c +++ b/stdio-common/printf-prs.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 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 @@ -66,17 +66,16 @@ parse_printf_format (fmt, n, argtypes) size_t nargs; /* Number of arguments. */ size_t max_ref_arg; /* Highest index used in a positional arg. */ struct printf_spec spec; - mbstate_t mbstate; const unsigned char *f = (const unsigned char *) fmt; nargs = 0; max_ref_arg = 0; /* Search for format specifications. */ - for (f = __find_specmb (f, &mbstate); *f != '\0'; f = spec.next_fmt) + for (f = __find_specmb (f); *f != '\0'; f = spec.next_fmt) { /* Parse this spec. */ - nargs += __parse_one_specmb (f, nargs, &spec, &max_ref_arg, &mbstate); + nargs += __parse_one_specmb (f, nargs, &spec, &max_ref_arg); /* If the width is determined by an argument this is an int. */ if (spec.width_arg != -1 && (size_t) spec.width_arg < n) diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index fae0f7464e..d1dc1aaf59 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -209,11 +209,6 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) CHAR_T *workstart = NULL; CHAR_T *workend; - /* State for restartable multibyte character handling functions. */ -#ifndef COMPILE_WPRINTF - mbstate_t mbstate; -#endif - /* We have to save the original argument pointer. */ va_list ap_save; @@ -1294,11 +1289,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* Find the first format specifier. */ f = lead_str_end = __find_specwc ((const UCHAR_T *) format); #else - /* Put state for processing format string in initial state. */ - memset (&mbstate, '\0', sizeof (mbstate_t)); - /* Find the first format specifier. */ - f = lead_str_end = __find_specmb ((const UCHAR_T *) format, &mbstate); + f = lead_str_end = __find_specmb ((const UCHAR_T *) format); #endif /* Lock stream. */ @@ -1591,7 +1583,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) #ifdef COMPILE_WPRINTF f = __find_specwc ((end_of_spec = ++f)); #else - f = __find_specmb ((end_of_spec = ++f), &mbstate); + f = __find_specmb ((end_of_spec = ++f)); #endif /* Write the following constant string. */ @@ -1674,8 +1666,7 @@ do_positional: #ifdef COMPILE_WPRINTF nargs += __parse_one_specwc (f, nargs, &specs[nspecs], &max_ref_arg); #else - nargs += __parse_one_specmb (f, nargs, &specs[nspecs], &max_ref_arg, - &mbstate); + nargs += __parse_one_specmb (f, nargs, &specs[nspecs], &max_ref_arg); #endif } diff --git a/stdlib/Makefile b/stdlib/Makefile index 7390647d8e..e72ab5b99d 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -68,7 +68,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ tst-limits tst-rand48 bug-strtod tst-setcontext \ test-a64l tst-qsort tst-system testmb2 bug-strtod2 \ tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \ - tst-makecontext tst-strtod4 tst-strtod5 + tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 include ../Makeconfig diff --git a/stdlib/msort.c b/stdlib/msort.c index e69b4011c4..3961e9e981 100644 --- a/stdlib/msort.c +++ b/stdlib/msort.c @@ -1,6 +1,6 @@ /* An alternative to qsort, with an identical interface. This file is part of the GNU C Library. - Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc. + Copyright (C) 1992,95-97,99,2000,01,02,04,07 Free Software Foundation, Inc. Written by Mike Haertel, September 1988. The GNU C Library is free software; you can redistribute it and/or @@ -19,20 +19,25 @@ 02111-1307 USA. */ #include +#include #include #include #include #include #include -static void msort_with_tmp (void *b, size_t n, size_t s, - __compar_fn_t cmp, char *t); +struct msort_param +{ + size_t s; + size_t var; + __compar_fn_t cmp; + char *t; +}; +static void msort_with_tmp (const struct msort_param *p, void *b, size_t n); static void -msort_with_tmp (void *b, size_t n, size_t s, __compar_fn_t cmp, - char *t) +msort_with_tmp (const struct msort_param *p, void *b, size_t n) { - char *tmp; char *b1, *b2; size_t n1, n2; @@ -42,65 +47,131 @@ msort_with_tmp (void *b, size_t n, size_t s, __compar_fn_t cmp, n1 = n / 2; n2 = n - n1; b1 = b; - b2 = (char *) b + (n1 * s); + b2 = (char *) b + (n1 * p->s); - msort_with_tmp (b1, n1, s, cmp, t); - msort_with_tmp (b2, n2, s, cmp, t); + msort_with_tmp (p, b1, n1); + msort_with_tmp (p, b2, n2); - tmp = t; + char *tmp = p->t; + const size_t s = p->s; + __compar_fn_t cmp = p->cmp; + switch (p->var) + { + case 0: + while (n1 > 0 && n2 > 0) + { + if ((*cmp) (b1, b2) <= 0) + { + *(uint32_t *) tmp = *(uint32_t *) b1; + b1 += sizeof (uint32_t); + --n1; + } + else + { + *(uint32_t *) tmp = *(uint32_t *) b2; + b2 += sizeof (uint32_t); + --n2; + } + tmp += sizeof (uint32_t); + } + break; + case 1: + while (n1 > 0 && n2 > 0) + { + if ((*cmp) (b1, b2) <= 0) + { + *(uint64_t *) tmp = *(uint64_t *) b1; + b1 += sizeof (uint64_t); + --n1; + } + else + { + *(uint64_t *) tmp = *(uint64_t *) b2; + b2 += sizeof (uint64_t); + --n2; + } + tmp += sizeof (uint64_t); + } + break; + case 2: + while (n1 > 0 && n2 > 0) + { + unsigned long *tmpl = (unsigned long *) tmp; + unsigned long *bl; + + tmp += s; + if ((*cmp) (b1, b2) <= 0) + { + bl = (unsigned long *) b1; + b1 += s; + --n1; + } + else + { + bl = (unsigned long *) b2; + b2 += s; + --n2; + } + while (tmpl < (unsigned long *) tmp) + *tmpl++ = *bl++; + } + break; + case 3: + while (n1 > 0 && n2 > 0) + { + if ((*cmp) (*(const void **) b1, *(const void **) b2) <= 0) + { + *(void **) tmp = *(void **) b1; + b1 += sizeof (void *); + --n1; + } + else + { + *(void **) tmp = *(void **) b2; + b2 += sizeof (void *); + --n2; + } + tmp += sizeof (void *); + } + break; + default: + while (n1 > 0 && n2 > 0) + { + if ((*cmp) (b1, b2) <= 0) + { + tmp = (char *) __mempcpy (tmp, b1, s); + b1 += s; + --n1; + } + else + { + tmp = (char *) __mempcpy (tmp, b2, s); + b2 += s; + --n2; + } + } + break; + } - if (s == OPSIZ && (b1 - (char *) 0) % OPSIZ == 0) - /* We are operating on aligned words. Use direct word stores. */ - while (n1 > 0 && n2 > 0) - { - if ((*cmp) (b1, b2) <= 0) - { - --n1; - *((op_t *) tmp) = *((op_t *) b1); - tmp += sizeof (op_t); - b1 += sizeof (op_t); - } - else - { - --n2; - *((op_t *) tmp) = *((op_t *) b2); - tmp += sizeof (op_t); - b2 += sizeof (op_t); - } - } - else - while (n1 > 0 && n2 > 0) - { - if ((*cmp) (b1, b2) <= 0) - { - tmp = (char *) __mempcpy (tmp, b1, s); - b1 += s; - --n1; - } - else - { - tmp = (char *) __mempcpy (tmp, b2, s); - b2 += s; - --n2; - } - } if (n1 > 0) memcpy (tmp, b1, n1 * s); - memcpy (b, t, (n - n2) * s); + memcpy (b, p->t, (n - n2) * s); } void qsort (void *b, size_t n, size_t s, __compar_fn_t cmp) { - const size_t size = n * s; + size_t size = n * s; + char *tmp = NULL; + struct msort_param p; - if (size < 1024) - { - void *buf = __alloca (size); + /* For large object sizes use indirect sorting. */ + if (s > 32) + size = 2 * n * sizeof (void *) + s; - /* The temporary array is small, so put it on the stack. */ - msort_with_tmp (b, n, s, cmp, buf); - } + if (size < 1024) + /* The temporary array is small, so put it on the stack. */ + p.t = __alloca (size); else { /* We should avoid allocating too much memory since this might @@ -135,26 +206,89 @@ qsort (void *b, size_t n, size_t s, __compar_fn_t cmp) /* If the memory requirements are too high don't allocate memory. */ if (size / pagesize > (size_t) phys_pages) - _quicksort (b, n, s, cmp); - else { - /* It's somewhat large, so malloc it. */ - int save = errno; - char *tmp = malloc (size); - if (tmp == NULL) - { - /* Couldn't get space, so use the slower algorithm - that doesn't need a temporary array. */ - __set_errno (save); - _quicksort (b, n, s, cmp); - } - else - { - __set_errno (save); - msort_with_tmp (b, n, s, cmp, tmp); - free (tmp); - } + _quicksort (b, n, s, cmp); + return; + } + + /* It's somewhat large, so malloc it. */ + int save = errno; + tmp = malloc (size); + __set_errno (save); + if (tmp == NULL) + { + /* Couldn't get space, so use the slower algorithm + that doesn't need a temporary array. */ + _quicksort (b, n, s, cmp); + return; + } + p.t = tmp; + } + + p.s = s; + p.cmp = cmp; + p.var = 4; + + if (s > 32) + { + /* Indirect sorting. */ + char *ip = (char *) b; + void **tp = (void **) (p.t + n * sizeof (void *)); + void **t = tp; + void *tmp_storage = (void *) (tp + n); + + while ((void *) t < tmp_storage) + { + *t++ = ip; + ip += s; + } + p.s = sizeof (void *); + p.var = 3; + msort_with_tmp (&p, p.t + n * sizeof (void *), n); + + /* tp[0] .. tp[n - 1] is now sorted, copy around entries of + the original array. Knuth vol. 3 (2nd ed.) exercise 5.2-10. */ + char *kp; + size_t i; + for (i = 0, ip = (char *) b; i < n; i++, ip += s) + if ((kp = tp[i]) != ip) + { + size_t j = i; + char *jp = ip; + memcpy (tmp_storage, ip, s); + + do + { + size_t k = (kp - (char *) b) / s; + tp[j] = jp; + memcpy (jp, kp, s); + j = k; + jp = kp; + kp = tp[k]; + } + while (kp != ip); + + tp[j] = jp; + memcpy (jp, tmp_storage, s); + } + } + else + { + if ((s & (sizeof (uint32_t) - 1)) == 0 + && ((char *) b - (char *) 0) % __alignof__ (uint32_t) == 0) + { + if (s == sizeof (uint32_t)) + p.var = 0; + else if (s == sizeof (uint64_t) + && ((char *) b - (char *) 0) % __alignof__ (uint64_t) == 0) + p.var = 1; + else if ((s & (sizeof (unsigned long) - 1)) == 0 + && ((char *) b - (char *) 0) + % __alignof__ (unsigned long) == 0) + p.var = 2; } + msort_with_tmp (&p, b, n); } + free (tmp); } libc_hidden_def (qsort) diff --git a/stdlib/tst-qsort2.c b/stdlib/tst-qsort2.c new file mode 100644 index 0000000000..75d4a1732d --- /dev/null +++ b/stdlib/tst-qsort2.c @@ -0,0 +1,89 @@ +#include +#include + +char *array; +char *array_end; +size_t member_size; + +int +compare (const void *a1, const void *b1) +{ + const char *a = a1; + const char *b = b1; + + if (! (array <= a && a < array_end + && array <= b && b < array_end)) + { + puts ("compare arguments not inside of the array"); + exit (EXIT_FAILURE); + } + int ret = b[0] - a[0]; + if (ret) + return ret; + if (member_size > 1) + return b[1] - a[1]; + return 0; +} + +int +test (size_t nmemb, size_t size) +{ + array = malloc (nmemb * size); + if (array == NULL) + { + printf ("%zd x %zd: no memory", nmemb, size); + return 1; + } + + array_end = array + nmemb * size; + member_size = size; + + char *p; + size_t i; + size_t bias = random (); + for (i = 0, p = array; i < nmemb; i++, p += size) + { + p[0] = (char) (i + bias); + if (size > 1) + p[1] = (char) ((i + bias) >> 8); + } + + qsort (array, nmemb, size, compare); + + for (i = 0, p = array; i < nmemb - 1; i++, p += size) + { + if (p[0] < p[size] + || (size > 1 && p[0] == p[size] && p[1] < p[size + 1])) + { + printf ("%zd x %zd: failure at offset %zd\n", nmemb, + size, i); + free (array); + return 1; + } + } + + free (array); + return 0; +} + +int +main (int argc, char **argv) +{ + int ret = 0; + if (argc >= 2) + ret |= test (atoi (argv[1]), atoi (argv[2])); + else + { + ret |= test (10000, 1); + ret |= test (200000, 2); + ret |= test (2000000, 3); + ret |= test (2132310, 4); + ret |= test (1202730, 7); + ret |= test (1184710, 8); + ret |= test (272710, 12); + ret |= test (14170, 32); + ret |= test (4170, 320); + } + + return ret; +} diff --git a/string/bits/string2.h b/string/bits/string2.h index 1e4d736a17..6a18a1afc6 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1305,7 +1305,7 @@ extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; # define __strdup(s) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ + ? (char *) calloc ((size_t) 1, (size_t) 1) \ : ({ size_t __len = strlen (s) + 1; \ char *__retval = (char *) malloc (__len); \ if (__retval != NULL) \ @@ -1325,7 +1325,7 @@ extern char *__strndup (__const char *__string, size_t __n) # define __strndup(s, n) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ + ? (char *) calloc ((size_t) 1, (size_t) 1) \ : ({ size_t __len = strlen (s) + 1; \ size_t __n = (n); \ char *__retval; \ diff --git a/sunrpc/svc.c b/sunrpc/svc.c index 1e358e247c..60f6fcdd79 100644 --- a/sunrpc/svc.c +++ b/sunrpc/svc.c @@ -61,6 +61,7 @@ struct svc_callout { rpcprog_t sc_prog; rpcvers_t sc_vers; void (*sc_dispatch) (struct svc_req *, SVCXPRT *); + bool_t sc_mapped; }; #ifdef _RPC_THREAD_SAFE_ #define svc_head RPC_THREAD_VARIABLE(svc_head_s) @@ -160,6 +161,17 @@ done: return s; } + +static bool_t +svc_is_mapped (rpcprog_t prog, rpcvers_t vers) +{ + struct svc_callout *prev; + register struct svc_callout *s; + s = svc_find (prog, vers, &prev); + return s!= NULL_SVC && s->sc_mapped; +} + + /* Add a service program to the callout list. The dispatch routine will be called when a rpc request for this program number comes in. */ @@ -185,12 +197,18 @@ svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers, s->sc_vers = vers; s->sc_dispatch = dispatch; s->sc_next = svc_head; + s->sc_mapped = FALSE; svc_head = s; pmap_it: /* now register the information with the local binder service */ if (protocol) - return pmap_set (prog, vers, protocol, xprt->xp_port); + { + if (! pmap_set (prog, vers, protocol, xprt->xp_port)) + return FALSE; + + s->sc_mapped = TRUE; + } return TRUE; } @@ -214,7 +232,8 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers) s->sc_next = NULL_SVC; mem_free ((char *) s, (u_int) sizeof (struct svc_callout)); /* now unregister the information with the local binder service */ - pmap_unset (prog, vers); + if (! svc_is_mapped (prog, vers)) + pmap_unset (prog, vers); } libc_hidden_def (svc_unregister) diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h index 2c04ec9b7f..2ab2909f20 100644 --- a/sysdeps/gnu/netinet/tcp.h +++ b/sysdeps/gnu/netinet/tcp.h @@ -50,6 +50,7 @@ #define TCP_INFO 11 /* Information about this connection. */ #define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ #define TCP_CONGESTION 13 /* Congestion control algorithm. */ +#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ #ifdef __USE_MISC # include @@ -219,6 +220,24 @@ struct tcp_info u_int32_t tcpi_snd_cwnd; u_int32_t tcpi_advmss; u_int32_t tcpi_reordering; + + u_int32_t tcpi_rcv_rtt; + u_int32_t tcpi_rcv_space; + + u_int32_t tcpi_total_retrans; +}; + + +/* For TCP_MD5SIG socket option. */ +#define TCP_MD5SIG_MAXKEYLEN 80 + +struct tcp_md5sig +{ + struct __kernel_sockaddr_storage tcpm_addr; /* Address associated. */ + u_int16_t __tcpm_pad1; /* Zero. */ + u_int16_t tcpm_keylen; /* Key length. */ + u_int32_t __tcpm_pad2; /* Zero. */ + u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ }; #endif /* Misc. */ diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S index af9eaf6d56..73b08ba67e 100644 --- a/sysdeps/i386/dl-trampoline.S +++ b/sysdeps/i386/dl-trampoline.S @@ -113,6 +113,7 @@ _dl_runtime_profile: movl %ebx, %ecx orl $4, %ebx # Increase frame size if necessary to align # stack for the function call + andl $~3, %ebx movl %esp, %edi subl %ebx, %edi movl %esp, %ebx @@ -121,9 +122,9 @@ _dl_runtime_profile: shrl $2, %ecx rep movsl - movl (%edi), %esi + movl (%ebx), %esi cfi_restore (esi) - movl 4(%edi), %edi + movl 4(%ebx), %edi cfi_restore (edi) /* %ebx+40 return address diff --git a/sysdeps/ieee754/dbl-64/e_lgamma_r.c b/sysdeps/ieee754/dbl-64/e_lgamma_r.c index cc44b048f4..a298a5a2a4 100644 --- a/sysdeps/ieee754/dbl-64/e_lgamma_r.c +++ b/sysdeps/ieee754/dbl-64/e_lgamma_r.c @@ -228,7 +228,12 @@ static double zero= 0.00000000000000000000e+00; *signgamp = 1; ix = hx&0x7fffffff; if(ix>=0x7ff00000) return x*x; - if((ix|lx)==0) return one/fabs(x); + if((ix|lx)==0) + { + if (hx < 0) + *signgamp = -1; + return one/fabs(x); + } if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */ if(hx<0) { *signgamp = -1; diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c index 5ebebb77af..0ed2610085 100644 --- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c +++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c @@ -164,7 +164,12 @@ static float zero= 0.0000000000e+00; *signgamp = 1; ix = hx&0x7fffffff; if(ix>=0x7f800000) return x*x; - if(ix==0) return one/fabsf(x); + if(ix==0) + { + if (hx < 0) + *signgamp = -1; + return one/fabsf(x); + } if(ix<0x1c800000) { /* |x|<2**-70, return -log(|x|) */ if(hx<0) { *signgamp = -1; diff --git a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c index fecbee9b2a..36e336565c 100644 --- a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c +++ b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c @@ -11,9 +11,9 @@ /* Long double expansions are Copyright (C) 2001 Stephen L. Moshier - and are incorporated herein by permission of the author. The author + and are incorporated herein by permission of the author. The author reserves the right to distribute this material elsewhere under different - copying permissions. These modifications are distributed here under + copying permissions. These modifications are distributed here under the following terms: This library is free software; you can redistribute it and/or @@ -302,7 +302,11 @@ __ieee754_lgammal_r (x, signgamp) ix = se & 0x7fff; if ((ix | i0 | i1) == 0) - return one / fabsl (x); + { + if (se & 0x8000) + *signgamp = -1; + return one / fabsl (x); + } ix = (ix << 16) | (i0 >> 16); diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 119e37b345..6ba3a25c84 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -13,7 +13,8 @@ endif ifeq ($(subdir),misc) sysdep_routines += sysctl clone llseek umount umount2 readahead \ - setfsuid setfsgid makedev epoll_pwait + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write CFLAGS-gethostid.c = -fexceptions diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 5413ced74c..dbf2ae5901 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -129,6 +129,9 @@ libc { GLIBC_2.6 { epoll_pwait; sync_file_range; sched_getcpu; } + GLIBC_2.7 { + eventfd; eventfd_read; eventfd_write; signalfd; + } GLIBC_PRIVATE { # functions used in other libraries __syscall_rt_sigqueueinfo; diff --git a/sysdeps/unix/sysv/linux/eventfd.c b/sysdeps/unix/sysv/linux/eventfd.c new file mode 100644 index 0000000000..180861aad2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/eventfd.c @@ -0,0 +1,43 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +int +eventfd (int count, int flags) +{ + /* The system call has no flag parameter which is bad. So we have + to wait until we have to support to pass additional values to the + kernel (sys_indirect) before implementing setting flags like + O_NONBLOCK etc. */ + if (flags != 0) + { + __set_errno (EINVAL); + return -1; + } + +#ifdef __NR_eventfd + return INLINE_SYSCALL (eventfd, 1, count); +#else + __set_errno (ENOSYS); + return -1; +#endif +} diff --git a/sysdeps/unix/sysv/linux/eventfd_read.c b/sysdeps/unix/sysv/linux/eventfd_read.c new file mode 100644 index 0000000000..3b1059a0ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/eventfd_read.c @@ -0,0 +1,28 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +int +eventfd_read (int fd, eventfd_t *value) +{ + return __read (fd, value, sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0; +} diff --git a/sysdeps/unix/sysv/linux/eventfd_write.c b/sysdeps/unix/sysv/linux/eventfd_write.c new file mode 100644 index 0000000000..4b15990c3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/eventfd_write.c @@ -0,0 +1,29 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +int +eventfd_write (int fd, eventfd_t value) +{ + return __write (fd, &value, + sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0; +} diff --git a/sysdeps/unix/sysv/linux/signalfd.c b/sysdeps/unix/sysv/linux/signalfd.c new file mode 100644 index 0000000000..09355ecd1d --- /dev/null +++ b/sysdeps/unix/sysv/linux/signalfd.c @@ -0,0 +1,44 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + + +int +signalfd (int fd, const sigset_t *mask, int flags) +{ + /* The system call has no flag parameter which is bad. So we have + to wait until we have to support to pass additional values to the + kernel (sys_indirect) before implementing setting flags like + O_NONBLOCK etc. */ + if (flags != 0) + { + __set_errno (EINVAL); + return -1; + } + +#ifdef __NR_signalfd + return INLINE_SYSCALL (signalfd, 3, fd, mask, _NSIG / 8); +#else + __set_errno (ENOSYS); + return -1; +#endif +} diff --git a/sysdeps/unix/sysv/linux/sys/eventfd.h b/sysdeps/unix/sysv/linux/sys/eventfd.h new file mode 100644 index 0000000000..1ebaea7b30 --- /dev/null +++ b/sysdeps/unix/sysv/linux/sys/eventfd.h @@ -0,0 +1,43 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_EVENTFD_H +#define _SYS_EVENTFD_H 1 + +#include + + +/* Type for event counter. */ +typedef uint64_t eventfd_t; + + +__BEGIN_DECLS + +/* Return file descriptor for generic event channel. Set initial + value to COUNT. */ +extern int eventfd (int __count, int __flags) __THROW; + +/* Read event counter and possibly wait for events. */ +extern int eventfd_read (int __fd, eventfd_t *__value); + +/* Increment event counter. */ +extern int eventfd_write (int __fd, eventfd_t value); + +__END_DECLS + +#endif /* sys/eventfd.h */ diff --git a/sysdeps/unix/sysv/linux/sys/signalfd.h b/sysdeps/unix/sysv/linux/sys/signalfd.h new file mode 100644 index 0000000000..247b20b9d2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/sys/signalfd.h @@ -0,0 +1,58 @@ +/* Copyright (C) 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_SIGNALFD_H +#define _SYS_SIGNALFD_H 1 + +#define __need_sigset_t +#include +#include + + +struct signalfd_siginfo +{ + uint32_t ssi_signo; + int32_t ssi_errno; + int32_t ssi_code; + uint32_t ssi_pid; + uint32_t ssi_uid; + int32_t ssi_fd; + uint32_t ssi_tid; + uint32_t ssi_band; + uint32_t ssi_overrun; + uint32_t ssi_trapno; + int32_t ssi_status; + int32_t ssi_int; + uintptr_t ssi_ptr; + uint64_t ssi_utime; + uint64_t ssi_stime; + uint64_t ssi_addr; + uint8_t __pad[48]; +}; + + +__BEGIN_DECLS + +/* Request notification for delivery of signals in MASK to be + performed using descriptor FD.*/ +extern int signalfd (int __fd, const sigset_t *__mask, int __flags) + __nonnull (2) __THROW; + +__END_DECLS + +#endif /* sys/signalfd.h */ diff --git a/sysdeps/x86_64/cacheinfo.c b/sysdeps/x86_64/cacheinfo.c index 5b92bd5849..12102fea81 100644 --- a/sysdeps/x86_64/cacheinfo.c +++ b/sysdeps/x86_64/cacheinfo.c @@ -456,6 +456,13 @@ init_cacheinfo (void) asm volatile ("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "0" (4), "2" (i++)); + + /* There seems to be a bug in at least some Pentium Ds + which sometimes fail to iterate all cache parameters. + Do not loop indefinitely here, stop in this case and + assume there is no such information. */ + if ((eax & 0x1f) == 0) + goto intel_bug_no_cache_info; } while (((eax >> 5) & 0x7) != level); @@ -463,6 +470,7 @@ init_cacheinfo (void) } else { + intel_bug_no_cache_info: /* Assume that all logical threads share the highest cache level. */ asm volatile ("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) diff --git a/timezone/africa b/timezone/africa index 141365cce3..434110ccd7 100644 --- a/timezone/africa +++ b/timezone/africa @@ -1,4 +1,4 @@ -# @(#)africa 8.7 +# @(#)africa 8.10 #
 
 # This data is by no means authoritative; if you think you know better,
@@ -218,7 +218,25 @@ Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # after observing the daylight saving time since May.
 # http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf
 Rule	Egypt	2006	only	-	Sep	21	23:00s	0	-
-Rule	Egypt	2007	max	-	Sep	lastThu	23:00s	0	-
+# From Dirk Losch (2007-08-14):
+# I received a mail from an airline which says that the daylight
+# saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07.
+# From Jesper Norgaard Welen (2007-08-15): [The following agree:]
+# http://www.nentjes.info/Bill/bill5.htm 
+# http://www.timeanddate.com/worldclock/city.html?n=53
+# From Steffen Thorsen (2007-09-04): The official information...:
+# http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm
+Rule	Egypt	2007	only	-	Sep	Thu>=1	23:00s	0	-
+# From Abdelrahman Hassan (2007-09-06):
+# Due to the Hijri (lunar Islamic calendar) year being 11 days shorter
+# than the year of the Gregorian calendar, Ramadan shifts earlier each
+# year. This year it will be observed September 13 (September is quite
+# hot in Egypt), and the idea is to make fasting easier for workers by
+# shifting business hours one hour out of daytime heat. Consequently,
+# unless discontinued, next DST may end Thursday 28 August 2008.
+# From Paul Eggert (2007-08-17):
+# For lack of better info, assume the new rule is last Thursday in August.
+Rule	Egypt	2008	max	-	Aug	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct
@@ -416,6 +434,20 @@ Zone	Africa/Maputo	2:10:20 -	LMT	1903 Mar
 # Namibia
 # The 1994-04-03 transition is from Shanks & Pottenger.
 # Shanks & Pottenger report no DST after 1998-04; go with IATA.
+
+# From Petronella Sibeene (2007-03-30) in
+# :
+# While the entire country changes its time, Katima Mulilo and other
+# settlements in Caprivi unofficially will not because the sun there
+# rises and sets earlier compared to other regions.  Chief of
+# Forecasting Riaan van Zyl explained that the far eastern parts of
+# the country are close to 40 minutes earlier in sunrise than the rest
+# of the country.
+# 
+# From Paul Eggert (2007-03-31):
+# Apparently the Caprivi Strip informally observes Botswana time, but
+# we have no details.  In the meantime people there can use Africa/Gaborone.
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Namibia	1994	max	-	Sep	Sun>=1	2:00	1:00	S
 Rule	Namibia	1995	max	-	Apr	Sun>=1	2:00	0	-
diff --git a/timezone/antarctica b/timezone/antarctica
index 2584ae4f1d..ef279cbeda 100644
--- a/timezone/antarctica
+++ b/timezone/antarctica
@@ -1,4 +1,4 @@
-# @(#)antarctica	8.3
+# @(#)antarctica	8.4
 # 
 
 # From Paul Eggert (1999-11-15):
@@ -191,10 +191,12 @@ Zone Antarctica/Syowa	0	-	zzz	1957 Jan 29
 Rule	NZAQ	1974	only	-	Nov	 3	2:00s	1:00	D
 Rule	NZAQ	1975	1988	-	Oct	lastSun	2:00s	1:00	D
 Rule	NZAQ	1989	only	-	Oct	 8	2:00s	1:00	D
-Rule	NZAQ	1990	max	-	Oct	Sun>=1	2:00s	1:00	D
+Rule	NZAQ	1990	2006	-	Oct	Sun>=1	2:00s	1:00	D
 Rule	NZAQ	1975	only	-	Feb	23	2:00s	0	S
 Rule	NZAQ	1976	1989	-	Mar	Sun>=1	2:00s	0	S
-Rule	NZAQ	1990	max	-	Mar	Sun>=15	2:00s	0	S
+Rule	NZAQ	1990	2007	-	Mar	Sun>=15	2:00s	0	S
+Rule	NZAQ	2007	max	-	Sep	lastSun	2:00s	1:00	D
+Rule	NZAQ	2008	max	-	Apr	Sun>=1	2:00s	0	S
 
 # Norway - territories
 # Bouvet (never inhabited)
diff --git a/timezone/asia b/timezone/asia
index 78c2cf5967..3007414a7f 100644
--- a/timezone/asia
+++ b/timezone/asia
@@ -1,4 +1,4 @@
-# @(#)asia	8.10
+# @(#)asia	8.12
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -568,14 +568,15 @@ Zone Asia/Jayapura	9:22:48 -	LMT	1932 Nov
 # Reingold's/Dershowitz' calculator gives correctly the Gregorian date
 # 2058-03-21 for 1 Farvardin 1437 (astronomical).
 #
-# From Paul Eggert (2006-03-22):
-# The above comments about post-2006 transitions may become relevant again,
-# if Iran ever resuscitates DST, so we'll leave the comments in.
-#
 # From Steffen Thorsen (2006-03-22):
 # Several of my users have reported that Iran will not observe DST anymore:
 # http://www.irna.ir/en/news/view/line-17/0603193812164948.htm
 #
+# From Reuters (2007-09-16), with a heads-up from Jesper Norgaard Welen:
+# ... the Guardian Council ... approved a law on Sunday to re-introduce
+# daylight saving time ...
+# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iran	1978	1980	-	Mar	21	0:00	1:00	D
 Rule	Iran	1978	only	-	Oct	21	0:00	0	S
@@ -596,6 +597,36 @@ Rule	Iran	2004	only	-	Mar	21	0:00	1:00	D
 Rule	Iran	2004	only	-	Sep	21	0:00	0	S
 Rule	Iran	2005	only	-	Mar	22	0:00	1:00	D
 Rule	Iran	2005	only	-	Sep	22	0:00	0	S
+Rule	Iran	2008	only	-	Mar	21	0:00	1:00	D
+Rule	Iran	2008	only	-	Sep	21	0:00	0	S
+Rule	Iran	2009	2011	-	Mar	22	0:00	1:00	D
+Rule	Iran	2009	2011	-	Sep	22	0:00	0	S
+Rule	Iran	2012	only	-	Mar	21	0:00	1:00	D
+Rule	Iran	2012	only	-	Sep	21	0:00	0	S
+Rule	Iran	2013	2015	-	Mar	22	0:00	1:00	D
+Rule	Iran	2013	2015	-	Sep	22	0:00	0	S
+Rule	Iran	2016	only	-	Mar	21	0:00	1:00	D
+Rule	Iran	2016	only	-	Sep	21	0:00	0	S
+Rule	Iran	2017	2019	-	Mar	22	0:00	1:00	D
+Rule	Iran	2017	2019	-	Sep	22	0:00	0	S
+Rule	Iran	2020	only	-	Mar	21	0:00	1:00	D
+Rule	Iran	2020	only	-	Sep	21	0:00	0	S
+Rule	Iran	2021	2023	-	Mar	22	0:00	1:00	D
+Rule	Iran	2021	2023	-	Sep	22	0:00	0	S
+Rule	Iran	2024	only	-	Mar	21	0:00	1:00	D
+Rule	Iran	2024	only	-	Sep	21	0:00	0	S
+Rule	Iran	2025	2027	-	Mar	22	0:00	1:00	D
+Rule	Iran	2025	2027	-	Sep	22	0:00	0	S
+Rule	Iran	2028	2029	-	Mar	21	0:00	1:00	D
+Rule	Iran	2028	2029	-	Sep	21	0:00	0	S
+Rule	Iran	2030	2031	-	Mar	22	0:00	1:00	D
+Rule	Iran	2030	2031	-	Sep	22	0:00	0	S
+Rule	Iran	2032	2033	-	Mar	21	0:00	1:00	D
+Rule	Iran	2032	2033	-	Sep	21	0:00	0	S
+Rule	Iran	2034	2035	-	Mar	22	0:00	1:00	D
+Rule	Iran	2034	2035	-	Sep	22	0:00	0	S
+Rule	Iran	2036	2037	-	Mar	21	0:00	1:00	D
+Rule	Iran	2036	2037	-	Sep	21	0:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Tehran	3:25:44	-	LMT	1916
 			3:25:44	-	TMT	1946	# Tehran Mean Time
@@ -1161,6 +1192,14 @@ Zone	Asia/Pyongyang	8:23:00 -	LMT	1890
 
 # Kuwait
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+# From the Arab Times (2007-03-14):
+# The Civil Service Commission (CSC) has approved a proposal forwarded
+# by MP Ahmad Baqer on implementing the daylight saving time (DST) in
+# Kuwait starting from April until the end of Sept this year, reports Al-Anba.
+# .
+# From Paul Eggert (2007-03-29):
+# We don't know the details, or whether the approval means it'll happen,
+# so for now we assume no DST.
 Zone	Asia/Kuwait	3:11:56 -	LMT	1950
 			3:00	-	AST
 
@@ -1510,6 +1549,17 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # I guess it is likely that next year's date will be moved as well,
 # because of the Ramadan.
 
+# From Jesper Norgaard Welen (2007-09-18):
+# According to Steffen Thorsen's web site the Gaza Strip and the rest of the
+# Palestinian territories left DST early on 13.th. of September at 2:00.
+
+# From Paul Eggert (2007-09-20):
+# My understanding is that Gaza and the West Bank disagree even over when
+# the weekend is (Thursday+Friday versus Friday+Saturday), so I'd be a bit
+# surprised if they agreed about DST.  But for now, assume they agree.
+# For lack of better information, predict that future changes will be
+# the 2nd Thursday of September at 02:00.
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -1525,7 +1575,7 @@ Rule Palestine	2004	only	-	Oct	 1	1:00	0	-
 Rule Palestine	2005	only	-	Oct	 4	2:00	0	-
 Rule Palestine	2006	max	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
-Rule Palestine	2007	max	-	Oct	Fri>=15	0:00	0	-
+Rule Palestine	2007	max	-	Sep	Thu>=8	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
@@ -1710,11 +1760,17 @@ Rule	Syria	1993	only	-	Sep	25	0:00	0	-
 Rule	Syria	1994	1996	-	Apr	 1	0:00	1:00	S
 Rule	Syria	1994	2005	-	Oct	 1	0:00	0	-
 Rule	Syria	1997	1998	-	Mar	lastMon	0:00	1:00	S
-Rule	Syria	1999	max	-	Apr	 1	0:00	1:00	S
+Rule	Syria	1999	2006	-	Apr	 1	0:00	1:00	S
 # From Stephen Colebourne (2006-09-18):
 # According to IATA data, Syria will change DST on 21st September [21:00 UTC]
 # this year [only]....  This is probably related to Ramadan, like Egypt.
 Rule	Syria	2006	only	-	Sep	22	0:00	0	-
+# From Paul Eggert (2007-03-29):
+# Today the AP reported "Syria will switch to summertime at midnight Thursday."
+# http://www.iht.com/articles/ap/2007/03/29/africa/ME-GEN-Syria-Time-Change.php
+# For lack of better info, assume the rule changed to "last Friday in March"
+# this year.
+Rule	Syria	2007	max	-	Mar	lastFri	0:00	1:00	S
 Rule	Syria	2007	max	-	Oct	 1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq
diff --git a/timezone/australasia b/timezone/australasia
index 40b0bf65f6..30d695ff5a 100644
--- a/timezone/australasia
+++ b/timezone/australasia
@@ -1,4 +1,4 @@
-# @(#)australasia	8.6
+# @(#)australasia	8.8
 # 
 
 # This file also includes Pacific islands.
@@ -79,7 +79,7 @@ Zone Australia/Lindeman  9:55:56 -	LMT	1895
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	AS	1971	1985	-	Oct	lastSun	2:00s	1:00	-
 Rule	AS	1986	only	-	Oct	19	2:00s	1:00	-
-Rule	AS	1987	max	-	Oct	lastSun	2:00s	1:00	-
+Rule	AS	1987	2007	-	Oct	lastSun	2:00s	1:00	-
 Rule	AS	1972	only	-	Feb	27	2:00s	0	-
 Rule	AS	1973	1985	-	Mar	Sun>=1	2:00s	0	-
 Rule	AS	1986	1989	-	Mar	Sun>=15	2:00s	0	-
@@ -90,7 +90,9 @@ Rule	AS	1993	only	-	Mar	Sun>=1	2:00s	0	-
 Rule	AS	1994	only	-	Mar	Sun>=18	2:00s	0	-
 Rule	AS	1995	2005	-	Mar	lastSun	2:00s	0	-
 Rule	AS	2006	only	-	Apr	Sun>=1	2:00s	0	-
-Rule	AS	2007	max	-	Mar	lastSun	2:00s	0	-
+Rule	AS	2007	only	-	Mar	lastSun	2:00s	0	-
+Rule	AS	2008	max	-	Apr	Sun>=1	2:00s	0	-
+Rule	AS	2008	max	-	Oct	Sun>=1	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Adelaide	9:14:20 -	LMT	1895 Feb
 			9:00	-	CST	1899 May
@@ -121,7 +123,8 @@ Rule	AT	1991	2005	-	Mar	lastSun	2:00s	0	-
 Rule	AT	2000	only	-	Aug	lastSun	2:00s	1:00	-
 Rule	AT	2001	max	-	Oct	Sun>=1	2:00s	1:00	-
 Rule	AT	2006	only	-	Apr	Sun>=1	2:00s	0	-
-Rule	AT	2007	max	-	Mar	lastSun	2:00s	0	-
+Rule	AT	2007	only	-	Mar	lastSun	2:00s	0	-
+Rule	AT	2008	max	-	Apr	Sun>=1	2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Hobart	9:49:16	-	LMT	1895 Sep
 			10:00	-	EST	1916 Oct 1 2:00
@@ -145,9 +148,11 @@ Rule	AV	1988	1999	-	Oct	lastSun	2:00s	1:00	-
 Rule	AV	1991	1994	-	Mar	Sun>=1	2:00s	0	-
 Rule	AV	1995	2005	-	Mar	lastSun	2:00s	0	-
 Rule	AV	2000	only	-	Aug	lastSun	2:00s	1:00	-
-Rule	AV	2001	max	-	Oct	lastSun	2:00s	1:00	-
+Rule	AV	2001	2007	-	Oct	lastSun	2:00s	1:00	-
 Rule	AV	2006	only	-	Apr	Sun>=1	2:00s	0	-
-Rule	AV	2007	max	-	Mar	lastSun	2:00s	0	-
+Rule	AV	2007	only	-	Mar	lastSun	2:00s	0	-
+Rule	AV	2008	max	-	Apr	Sun>=1	2:00s	0	-
+Rule	AV	2008	max	-	Oct	Sun>=1	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Melbourne 9:39:52 -	LMT	1895 Feb
 			10:00	Aus	EST	1971
@@ -166,9 +171,11 @@ Rule	AN	1987	1999	-	Oct	lastSun	2:00s	1:00	-
 Rule	AN	1990	1995	-	Mar	Sun>=1	2:00s	0	-
 Rule	AN	1996	2005	-	Mar	lastSun	2:00s	0	-
 Rule	AN	2000	only	-	Aug	lastSun	2:00s	1:00	-
-Rule	AN	2001	max	-	Oct	lastSun	2:00s	1:00	-
+Rule	AN	2001	2007	-	Oct	lastSun	2:00s	1:00	-
 Rule	AN	2006	only	-	Apr	Sun>=1	2:00s	0	-
-Rule	AN	2007	max	-	Mar	lastSun	2:00s	0	-
+Rule	AN	2007	only	-	Mar	lastSun	2:00s	0	-
+Rule	AN	2008	max	-	Apr	Sun>=1	2:00s	0	-
+Rule	AN	2008	max	-	Oct	Sun>=1	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Sydney	10:04:52 -	LMT	1895 Feb
 			10:00	Aus	EST	1971
@@ -191,9 +198,11 @@ Rule	LH	1987	1999	-	Oct	lastSun	2:00	0:30	-
 Rule	LH	1990	1995	-	Mar	Sun>=1	2:00	0	-
 Rule	LH	1996	2005	-	Mar	lastSun	2:00	0	-
 Rule	LH	2000	only	-	Aug	lastSun	2:00	0:30	-
-Rule	LH	2001	max	-	Oct	lastSun	2:00	0:30	-
+Rule	LH	2001	2007	-	Oct	lastSun	2:00	0:30	-
 Rule	LH	2006	only	-	Apr	Sun>=1	2:00	0	-
-Rule	LH	2007	max	-	Mar	lastSun	2:00	0	-
+Rule	LH	2007	only	-	Mar	lastSun	2:00	0	-
+Rule	LH	2008	max	-	Apr	Sun>=1	2:00	0	-
+Rule	LH	2008	max	-	Oct	Sun>=1	2:00	0:30	-
 Zone Australia/Lord_Howe 10:36:20 -	LMT	1895 Feb
 			10:00	-	EST	1981 Mar
 			10:30	LH	LHST
@@ -348,10 +357,14 @@ Rule	NZ	1976	1989	-	Mar	Sun>=1	2:00s	0	S
 Rule	Chatham	1976	1989	-	Mar	Sun>=1	2:45s	0	S
 Rule	NZ	1989	only	-	Oct	Sun>=8	2:00s	1:00	D
 Rule	Chatham	1989	only	-	Oct	Sun>=8	2:45s	1:00	D
-Rule	NZ	1990	max	-	Oct	Sun>=1	2:00s	1:00	D
-Rule	Chatham	1990	max	-	Oct	Sun>=1	2:45s	1:00	D
-Rule	NZ	1990	max	-	Mar	Sun>=15	2:00s	0	S
-Rule	Chatham	1990	max	-	Mar	Sun>=15	2:45s	0	S
+Rule	NZ	1990	2006	-	Oct	Sun>=1	2:00s	1:00	D
+Rule	Chatham	1990	2006	-	Oct	Sun>=1	2:45s	1:00	D
+Rule	NZ	1990	2007	-	Mar	Sun>=15	2:00s	0	S
+Rule	Chatham	1990	2007	-	Mar	Sun>=15	2:45s	0	S
+Rule	NZ	2007	max	-	Sep	lastSun	2:00s	1:00	D
+Rule	Chatham	2007	max	-	Sep	lastSun	2:45s	1:00	D
+Rule	NZ	2008	max	-	Apr	Sun>=1	2:00s	0	S
+Rule	Chatham	2008	max	-	Apr	Sun>=1	2:45s	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Pacific/Auckland	11:39:04 -	LMT	1868 Nov  2
 			11:30	NZ	NZ%sT	1946 Jan  1
@@ -449,11 +462,20 @@ Zone Pacific/Funafuti	11:56:52 -	LMT	1901
 # US minor outlying islands
 
 # Howland, Baker
-# uninhabited since World War II
-# no information; was probably like Pacific/Pago_Pago
+# Howland was mined for guano by American companies 1857-1878 and British
+# 1886-1891; Baker was similar but exact dates are not known.
+# Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
+# uninhabited thereafter.
+# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
+# see page 206 of Elgen M. Long and Marie K. Long,
+# Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
+# So most likely Howland and Baker observed Hawaii Time from 1935
+# until they were abandoned after the war.
 
 # Jarvis
-# uninhabited since 1958
+# Mined for guano by American companies 1857-1879 and British 1883?-1891?.
+# Inhabited by civilians 1935-1942; IGY scientific base 1957-1958;
+# uninhabited thereafter.
 # no information; was probably like Pacific/Kiritimati
 
 # Johnston
@@ -862,33 +884,13 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # introduction of standard time in 1895.
 
 
-# South Australia, Tasmania, Victoria
+# southeast Australia
+#
+# From Paul Eggert (2007-07-23):
+# Starting autumn 2008 Victoria, NSW, South Australia, Tasmania and the ACT
+# end DST the first Sunday in April and start DST the first Sunday in October.
+# http://www.theage.com.au/news/national/daylight-savings-to-span-six-months/2007/06/27/1182623966703.html
 
-# From Arthur David Olson (1992-03-08):
-# The rules from version 7.1 follow.
-# There are lots of differences between these rules and
-# the Shepherd et al. rules.  Since the Shepherd et al. rules
-# and Bradley White's newspaper article are in agreement on
-# current DST ending dates, no worries.
-#
-# Rule	Oz	1971	1985	-	Oct	lastSun	2:00	1:00	-
-# Rule	Oz	1986	max	-	Oct	Sun>=18	2:00	1:00	-
-# Rule	Oz	1972	only	-	Feb	27	3:00	0	-
-# Rule	Oz	1973	1986	-	Mar	Sun>=1	3:00	0	-
-# Rule	Oz	1987	max	-	Mar	Sun>=15	3:00	0	-
-# Zone	Australia/Tasmania	10:00	Oz	EST
-# Zone	Australia/South		9:30	Oz	CST
-# Zone	Australia/Victoria	10:00	Oz	EST	1985 Oct lastSun 2:00
-#				10:00	1:00	EST	1986 Mar Sun>=15 3:00
-#				10:00	Oz	EST
-
-# From Robert Elz (1991-03-06):
-# I believe that the current start date for DST is "lastSun" in Oct...
-# that changed Oct 89.  That is, we're back to the
-# original rule, and that rule currently applies in all the states
-# that have dst, incl Qld.  (Certainly it was true in Vic).
-# The file I'm including says that happened in 1988, I think
-# that's incorrect, but I'm not 100% certain.
 
 # South Australia
 
@@ -934,6 +936,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # was gazetted in the Government Hansard on Sep 26 1994....
 # start on last Sunday in October and end in last sunday in March.
 
+# From Paul Eggert (2007-07-23):
+# See "southeast Australia" above for 2008 and later.
+
 # Tasmania
 
 # The rules for 1967 through 1991 were reported by George Shepherd
@@ -956,6 +961,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Sim Alam (2000-07-03) reported a legal citation for the 2000/2001 rules:
 # http://www.thelaw.tas.gov.au/fragview/42++1968+GS3A@EN+2000070300
 
+# From Paul Eggert (2007-07-23):
+# See "southeast Australia" above for 2008 and later.
+
 # Victoria
 
 # The rules for 1971 through 1991 were reported by George Shepherd
@@ -985,6 +993,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # [1] http://www.hup.harvard.edu/catalog/HEISUN.html
 # [2] http://www.shrine.org.au
 
+# From Paul Eggert (2007-07-23):
+# See "southeast Australia" above for 2008 and later.
+
 # New South Wales
 
 # From Arthur David Olson:
@@ -1051,6 +1062,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # The Queensland Premier Peter Beattie is encouraging northern NSW
 # towns to use Queensland time.
 
+# From Paul Eggert (2007-07-23):
+# See "southeast Australia" above for 2008 and later.
+
 # Yancowinna
 
 # From John Mackin (1989-01-04):
@@ -1102,6 +1116,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # For Lord Howe dates we use Shanks & Pottenger through 1989, and
 # Lonergan thereafter.  For times we use Lonergan.
 
+# From Paul Eggert (2007-07-23):
+# See "southeast Australia" above for 2008 and later.
+
 ###############################################################################
 
 # New Zealand
@@ -1146,6 +1163,12 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # transitions at 2:45 local standard time; this confirms that Chatham
 # is always exactly 45 minutes ahead of Auckland.
 
+# From Colin Sharples (2007-04-30):
+# DST will now start on the last Sunday in September, and end on the
+# first Sunday in April.  The changes take effect this year, meaning
+# that DST will begin on 2007-09-30 2008-04-06.
+# http://www.dia.govt.nz/diawebsite.nsf/wpg_URL/Services-Daylight-Saving-Daylight-saving-to-be-extended
+
 ###############################################################################
 
 
diff --git a/timezone/europe b/timezone/europe
index 79c068ee5f..60290ddc5a 100644
--- a/timezone/europe
+++ b/timezone/europe
@@ -1,4 +1,4 @@
-# @(#)europe	8.10
+# @(#)europe	8.11
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -444,7 +444,7 @@ Zone	Europe/Dublin	-0:25:00 -	LMT	1880 Aug  2
 
 ###############################################################################
 
-# Continental Europe
+# Europe
 
 # EU rules are for the European Union, previously known as the EC, EEC,
 # Common Market, etc.
@@ -2386,6 +2386,8 @@ Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
+# "Kyiv" is the transliteration of the Ukrainian name, but
+# "Kiev" is more common in English.
 Zone Europe/Kiev	2:02:04 -	LMT	1880
 			2:02:04	-	KMT	1924 May  2 # Kiev Mean Time
 			2:00	-	EET	1930 Jun 21
@@ -2397,6 +2399,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			2:00	E-Eur	EE%sT	1995
 			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
+# "Uzhhorod" is the transliteration of the Ukrainian name, but
+# "Uzhgorod" is more common in English.
 Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 Oct
 			1:00	-	CET	1940
 			1:00	C-Eur	CE%sT	1944 Oct
@@ -2409,7 +2413,10 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 Oct
 			2:00	E-Eur	EE%sT	1995
 			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
-# Zaporozh'ye has an apostrophe, but Posix file names can't have apostrophes.
+# "Zaporizhia" is the transliteration of the Ukrainian name, but
+# "Zaporozh'ye" is more common in English.  Use the common English
+# spelling, except omit the apostrophe as it is not allowed in
+# portable Posix file names.
 Zone Europe/Zaporozhye	2:20:40 -	LMT	1880
 			2:20	-	CUT	1924 May  2 # Central Ukraine T
 			2:00	-	EET	1930 Jun 21
diff --git a/timezone/leapseconds b/timezone/leapseconds
index 6b99037785..583451e49e 100644
--- a/timezone/leapseconds
+++ b/timezone/leapseconds
@@ -1,4 +1,4 @@
-# @(#)leapseconds	8.3
+# @(#)leapseconds	8.4
 
 # Allowance for leapseconds added to each timezone file.
 
@@ -45,38 +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
 
-# ...
-# Sent: Thursday, February 01, 2007 9:49 AM
-# ...
-# Subject: Bulletin C number 33
-#
-# 	INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
-#
+# 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
+# Internet  : services.iers@obspm.fr
+#
+# Paris, 28 June 2007
 #
-#                                                Paris, 1 February 2007
-#                                                Bulletin C 33
-#                                                To authorities responsible
-#                                                for the measurement and
-#                                                distribution of time
+# Bulletin C 34
 #
-#                           INFORMATION ON UTC - TAI
+# To authorities responsible
+# for the measurement and
+# distribution of time
 #
-# NO positive leap second will be introduced at the end of June 2007.
+# INFORMATION ON UTC - TAI
+#
+# NO positive leap second will be introduced at the end of December 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.
+# 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
-# 				Director
-# 				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 3184b7bdff..73e13a5200 100644
--- a/timezone/northamerica
+++ b/timezone/northamerica
@@ -1,4 +1,4 @@
-# @(#)northamerica	8.15
+# @(#)northamerica	8.18
 # 
 
 # also includes Central America and the Caribbean
@@ -348,7 +348,7 @@ Zone America/North_Dakota/New_Salem -6:45:39 - LMT 1883 Nov 18 12:14:21
 #
 # Colorado, far western Kansas, Montana, western
 # Nebraska, Nevada border (Jackpot, Owyhee, and Mountain City),
-# New Mexico, southwestern North Dakota, far eastern Oregon,
+# New Mexico, southwestern North Dakota,
 # western South Dakota, far western Texas (El Paso County, Hudspeth County,
 # and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming
 #
@@ -369,7 +369,8 @@ Zone America/Denver	-6:59:56 -	LMT	1883 Nov 18 12:00:04
 # US Pacific time, represented by Los Angeles
 #
 # California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
-# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties),
+# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties,
+# and the northern three-quarters of Idaho county),
 # most of Nevada, most of Oregon, and Washington
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
@@ -527,7 +528,8 @@ Link America/Denver America/Shiprock
 # Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
 # Custer, Elmore, Franklin, Fremont, Gem, Gooding, Jefferson, Jerome,
 # Lemhi, Lincoln, Madison, Minidoka, Oneida, Owyhee, Payette, Power,
-# Teton, Twin Falls, Valley, Washington counties) and eastern Oregon
+# Teton, Twin Falls, Valley, Washington counties, and the southern
+# quarter of Idaho county) and eastern Oregon (most of Malheur County)
 # switched four weeks late in 1974.
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -544,7 +546,7 @@ Zone America/Boise	-7:44:49 -	LMT	1883 Nov 18 12:15:11
 # What time is it in Indiana?
 #  (2006-03-01)
 #
-# From Paul Eggert (2006-03-22):
+# From Paul Eggert (2007-08-17):
 # Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
 # with the following exceptions:
 #
@@ -556,11 +558,8 @@ Zone America/Boise	-7:44:49 -	LMT	1883 Nov 18 12:15:11
 # - Clark, Floyd, and Harrison counties have been like
 #   America/Kentucky/Louisville.
 #
-# - Daviess, Dubois, Knox, Martin, Perry, and Pulaski counties
-#   have been like America/Indiana/Vincennes.
-#
-# - Crawford, Pike, Starke, and Switzerland counties have their own time zone
-#   histories as noted below.
+# - Crawford, Daviess, Dubois, Knox, Martin, Perry, Pike, Pulaski, Starke,
+#   and Switzerland counties have their own time zone histories as noted below.
 #
 # Shanks partitioned Indiana into 345 regions, each with its own time history,
 # and wrote ``Even newspaper reports present contradictory information.''
@@ -628,8 +627,9 @@ 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, and Perry Counties, Indiana,
-# switched from eastern to central time in April 2006.
+# Daviess, Dubois, Knox, and Martin Counties, Indiana,
+# switched from eastern to central time in April 2006, then switched back
+# in November 2007.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule Vincennes	1946	only	-	Apr	lastSun	2:00	1:00	D
 Rule Vincennes	1946	only	-	Sep	lastSun	2:00	0	S
@@ -647,10 +647,31 @@ Zone America/Indiana/Vincennes -5:50:07 - LMT	1883 Nov 18 12:09:53
 			-5:00	-	EST	1969
 			-5:00	US	E%sT	1971
 			-5:00	-	EST	2006 Apr  2 2:00
+			-6:00	US	C%sT	2007 Nov  4 2:00
+			-5:00	US	E%sT
+#
+# Perry County, Indiana, switched from eastern to central time in April 2006.
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
+Rule Perry	1946	only	-	Apr	lastSun	2:00	1:00	D
+Rule Perry	1946	only	-	Sep	lastSun	2:00	0	S
+Rule Perry	1953	1954	-	Apr	lastSun	2:00	1:00	D
+Rule Perry	1953	1959	-	Sep	lastSun	2:00	0	S
+Rule Perry	1955	only	-	May	 1	0:00	1:00	D
+Rule Perry	1956	1963	-	Apr	lastSun	2:00	1:00	D
+Rule Perry	1960	only	-	Oct	lastSun	2:00	0	S
+Rule Perry	1961	only	-	Sep	lastSun	2:00	0	S
+Rule Perry	1962	1963	-	Oct	lastSun	2:00	0	S
+# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+Zone America/Indiana/Tell_City -5:47:03 - LMT	1883 Nov 18 12:12:57
+			-6:00	US	C%sT	1946
+			-6:00 Perry	C%sT	1964 Apr 26 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
 #
 # Pike County, Indiana moved from central to eastern time in 1977,
-# then switched back in 2006.
+# then switched back in 2006, then switched back again in 2007.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
 Rule	Pike	1955	only	-	May	 1	0:00	1:00	D
 Rule	Pike	1955	1960	-	Sep	lastSun	2:00	0	S
@@ -663,7 +684,8 @@ Zone America/Indiana/Petersburg -5:49:07 - LMT	1883 Nov 18 12:10:53
 			-5:00	-	EST	1966 Oct 30 2:00
 			-6:00	US	C%sT	1977 Oct 30 2:00
 			-5:00	-	EST	2006 Apr  2 2:00
-			-6:00	US	C%sT
+			-6:00	US	C%sT	2007 Nov  4 2:00
+			-5:00	US	E%sT
 #
 # Starke County, Indiana moved from central to eastern time in 1991,
 # then switched back in 2006.
@@ -2325,6 +2347,9 @@ Zone America/Guatemala	-6:02:04 -	LMT	1918 Oct 5
 #
 # The reason seems to be an energy crisis.
 
+# From Stephen Colebourne (2007-02-22):
+# Some IATA info: Haiti won't be having DST in 2007.
+
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Haiti	1983	only	-	May	8	0:00	1:00	D
@@ -2334,8 +2359,8 @@ Rule	Haiti	1983	1987	-	Oct	lastSun	0:00	0	S
 # Go with IATA.
 Rule	Haiti	1988	1997	-	Apr	Sun>=1	1:00s	1:00	D
 Rule	Haiti	1988	1997	-	Oct	lastSun	1:00s	0	S
-Rule	Haiti	2005	max	-	Apr	Sun>=1	0:00	1:00	D
-Rule	Haiti	2005	max	-	Oct	lastSun	0:00	0	S
+Rule	Haiti	2005	2006	-	Apr	Sun>=1	0:00	1:00	D
+Rule	Haiti	2005	2006	-	Oct	lastSun	0:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Port-au-Prince -4:49:20 -	LMT	1890
 			-4:49	-	PPMT	1917 Jan 24 12:00 # P-a-P MT
@@ -2366,11 +2391,15 @@ Zone America/Port-au-Prince -4:49:20 -	LMT	1890
 # published, I have located this authoritative source:
 # http://www.presidencia.gob.hn/noticia.aspx?nId=47
 
+# From Steffen Thorsen (2007-03-30):
+# http://www.laprensahn.com/pais_nota.php?id04962=7386
+# So it seems that Honduras will not enter DST this year....
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Hond	1987	1988	-	May	Sun>=1	0:00	1:00	D
 Rule	Hond	1987	1988	-	Sep	lastSun	0:00	0	S
-Rule	Hond	2006	2009	-	May	Sun>=1	0:00	1:00	D
-Rule	Hond	2006	2009	-	Aug	Mon>=1	0:00	0	S
+Rule	Hond	2006	only	-	May	Sun>=1	0:00	1:00	D
+Rule	Hond	2006	only	-	Aug	Mon>=1	0:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Tegucigalpa -5:48:52 -	LMT	1921 Apr
 			-6:00	Hond	C%sT
@@ -2514,13 +2543,31 @@ Zone America/St_Vincent	-4:04:56 -	LMT	1890		# Kingstown
 			-4:00	-	AST
 
 # Turks and Caicos
-# From Paul Eggert (2006-03-22):
+#
+# From Chris Dunn in
+# 
+# (2007-03-15): In the Turks & Caicos Islands (America/Grand_Turk) the
+# daylight saving dates for time changes have been adjusted to match
+# the recent U.S. change of dates.
+#
+# From Brian Inglis (2007-04-28):
+# http://www.turksandcaicos.tc/calendar/index.htm [2007-04-26]
+# there is an entry for Nov 4 "Daylight Savings Time Ends 2007" and three
+# rows before that there is an out of date entry for Oct:
+# "Eastern Standard Times Begins 2007
+# Clocks are set back one hour at 2:00 a.m. local Daylight Saving Time"
+# indicating that the normal ET rules are followed.
+#
+# From Paul Eggert (2006-05-01):
 # Shanks & Pottenger say they use US DST rules, but IATA SSIM (1991/1998)
-# says they switch at midnight.  Go with IATA SSIM.
+# says they switch at midnight.  Go with Shanks & Pottenger.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	TC	1979	1986	-	Apr	lastSun	0:00	1:00	D
-Rule	TC	1979	max	-	Oct	lastSun	0:00	0	S
-Rule	TC	1987	max	-	Apr	Sun>=1	0:00	1:00	D
+Rule	TC	1979	1986	-	Apr	lastSun	2:00	1:00	D
+Rule	TC	1979	2006	-	Oct	lastSun	2:00	0	S
+Rule	TC	1987	2006	-	Apr	Sun>=1	2:00	1:00	D
+Rule	TC	2007	max	-	Mar	Sun>=8	2:00	1:00	D
+Rule	TC	2007	max	-	Nov	Sun>=1	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Grand_Turk	-4:44:32 -	LMT	1890
 			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
diff --git a/timezone/southamerica b/timezone/southamerica
index 7aec8b6b8b..bfda827649 100644
--- a/timezone/southamerica
+++ b/timezone/southamerica
@@ -1,4 +1,4 @@
-# @(#)southamerica	8.11
+# @(#)southamerica	8.12
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -424,6 +424,10 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # modern Brazilian eletronic voting machines which, apparently, can't deal
 # with a time change between the first and the second rounds of the elections.
 
+# From Steffen Thorsen (2007-09-20):
+# Brazil will start DST on 2007-10-14 00:00 and end on 2008-02-17 00:00:
+# http://www.mme.gov.br/site/news/detail.do;jsessionid=BBA06811AFCAAC28F0285210913513DA?newsId=13975
+
 # From Paul Eggert (2002-10-10):
 # The official decrees referenced below are mostly taken from
 # 
@@ -557,13 +561,18 @@ Rule	Brazil	2004	only	-	Nov	 2	 0:00	1:00	S
 # Decree 5,539 (2005-09-19),
 # adopted by the same states as before.
 Rule	Brazil	2005	only	-	Oct	16	 0:00	1:00	S
-# Decree 5,920
-# (2006-10-03), adopted by the same states as before.
-Rule	Brazil	2006	max	-	Nov	Sun>=1	 0:00	1:00	S
-Rule	Brazil	2007	max	-	Feb	lastSun	 0:00	0	-
+# Decree 5,920 (2006-10-03),
+# adopted by the same states as before.
+Rule	Brazil	2006	only	-	Nov	 5	 0:00	1:00	S
+Rule	Brazil	2007	only	-	Feb	25	 0:00	0	-
+# (Decree number not yet known)
+# http://www.brasil.gov.br/noticias/ultimas_noticias/horario_verao070920/
+# (2007-09-20) after a heads-up from Steffen Thorsen:
+Rule	Brazil	2007	max	-	Oct	Sun>=8	 0:00	1:00	S
+Rule	Brazil	2008	max	-	Feb	Sun>=15	 0:00	0	-
 # The latest ruleset listed above says that the following states observe DST:
 # DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP.
-# For dates after mid-2007, the above rules with TO="max" are guesses
+# For dates after mid-2008, the above rules with TO="max" are guesses
 # and are quite possibly wrong, but are more likely than no DST at all.
 
 
@@ -1097,8 +1106,20 @@ Zone America/Montevideo	-3:44:44 -	LMT	1898 Jun 28
 			-3:00	Uruguay	UY%sT
 
 # Venezuela
+#
+# From Kiraz Janicke (2007-09-25), in
+# http://www.venezuelanalysis.com/analysis/2645:
+# The proposal ... involves turning the clock back half an hour from
+# +4.00 Greenwich Mean Time (GMT), to +4.30GMT, the time zone
+# Venezuela had until December 31, 1964, when the current time zone
+# was adopted. The change was due to take place on September 17 and
+# then on September 24, but has since been postponed until December
+# 31, to allow for compliance with international organizations, such
+# as the International Office of Weights and Measures.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Caracas	-4:27:44 -	LMT	1890
 			-4:27:40 -	CMT	1912 Feb 12 # Caracas Mean Time?
 			-4:30	-	VET	1965	     # Venezuela Time
-			-4:00	-	VET
+			-4:00	-	VET	2008
+			-4:30	-	VET
diff --git a/timezone/zic.c b/timezone/zic.c
index 592dfe5219..3cb0b171f0 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.11";
+static char	elsieid[] = "@(#)zic.c	8.14";
 
 #include "private.h"
 #include "locale.h"
@@ -114,7 +114,7 @@ static void	associate P((void));
 static int	ciequal P((const char * ap, const char * bp));
 static void	convert P((long val, char * buf));
 static void	convert64 P((zic_t val, char * buf));
-static void	dolink P((const char * fromfile, const char * tofile));
+static void	dolink P((const char * fromfield, const char * tofield));
 static void	doabbr P((char * abbr, const char * format,
 			const char * letters, int isdst, int doquotes));
 static void	eat P((const char * name, int num));
@@ -628,26 +628,26 @@ _("%s: More than one -L option specified\n"),
 }
 
 static void
-dolink(fromfile, tofile)
-const char * const	fromfile;
-const char * const	tofile;
+dolink(fromfield, tofield)
+const char * const	fromfield;
+const char * const	tofield;
 {
 	register char *	fromname;
 	register char *	toname;
 
-	if (fromfile[0] == '/')
-		fromname = ecpyalloc(fromfile);
+	if (fromfield[0] == '/')
+		fromname = ecpyalloc(fromfield);
 	else {
 		fromname = ecpyalloc(directory);
 		fromname = ecatalloc(fromname, "/");
-		fromname = ecatalloc(fromname, fromfile);
+		fromname = ecatalloc(fromname, fromfield);
 	}
-	if (tofile[0] == '/')
-		toname = ecpyalloc(tofile);
+	if (tofield[0] == '/')
+		toname = ecpyalloc(tofield);
 	else {
 		toname = ecpyalloc(directory);
 		toname = ecatalloc(toname, "/");
-		toname = ecatalloc(toname, tofile);
+		toname = ecatalloc(toname, tofield);
 	}
 	/*
 	** We get to be careful here since
@@ -666,7 +666,7 @@ const char * const	tofile;
 		if (result != 0 &&
 			access(fromname, F_OK) == 0 &&
 			!itsdir(fromname)) {
-				const char *s = tofile;
+				const char *s = tofield;
 				register char * symlinkcontents = NULL;
 
 				while ((s = strchr(s+1, '/')) != NULL)
@@ -926,7 +926,8 @@ const char *		string;
 const char * const	errstring;
 const int		signable;
 {
-	int	hh, mm, ss, sign;
+	long	hh;
+	int	mm, ss, sign;
 
 	if (string == NULL || *string == '\0')
 		return 0;
@@ -936,27 +937,32 @@ const int		signable;
 		sign = -1;
 		++string;
 	} else	sign = 1;
-	if (sscanf(string, scheck(string, "%d"), &hh) == 1)
+	if (sscanf(string, scheck(string, "%ld"), &hh) == 1)
 		mm = ss = 0;
-	else if (sscanf(string, scheck(string, "%d:%d"), &hh, &mm) == 2)
+	else if (sscanf(string, scheck(string, "%ld:%d"), &hh, &mm) == 2)
 		ss = 0;
-	else if (sscanf(string, scheck(string, "%d:%d:%d"),
+	else if (sscanf(string, scheck(string, "%ld:%d:%d"),
 		&hh, &mm, &ss) != 3) {
 			error(errstring);
 			return 0;
 	}
-	if ((hh < 0 || hh >= HOURSPERDAY ||
+	if (hh < 0 ||
 		mm < 0 || mm >= MINSPERHOUR ||
-		ss < 0 || ss > SECSPERMIN) &&
-		!(hh == HOURSPERDAY && mm == 0 && ss == 0)) {
+		ss < 0 || ss > SECSPERMIN) {
 			error(errstring);
 			return 0;
 	}
-	if (noise && hh == HOURSPERDAY)
+	if (LONG_MAX / SECSPERHOUR < hh) {
+		error(_("time overflow"));
+		return 0;
+	}
+	if (noise && hh == HOURSPERDAY && mm == 0 && ss == 0)
 		warning(_("24:00 not handled by pre-1998 versions of zic"));
-	return eitol(sign) *
-		(eitol(hh * MINSPERHOUR + mm) *
-		eitol(SECSPERMIN) + eitol(ss));
+	if (noise && (hh > HOURSPERDAY ||
+		(hh == HOURSPERDAY && (mm != 0 || ss != 0))))
+warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
+	return oadd(eitol(sign) * hh * eitol(SECSPERHOUR),
+		    eitol(sign) * (eitol(mm) * eitol(SECSPERMIN) + eitol(ss)));
 }
 
 static void
@@ -2271,6 +2277,10 @@ const int		ttisgmt;
 		error(_("too many local time types"));
 		exit(EXIT_FAILURE);
 	}
+	if (! (-1L - 2147483647L <= gmtoff && gmtoff <= 2147483647L)) {
+		error(_("UTC offset out of range"));
+		exit(EXIT_FAILURE);
+	}
 	gmtoffs[i] = gmtoff;
 	isdsts[i] = isdst;
 	ttisstds[i] = ttisstd;
diff --git a/timezone/zone.tab b/timezone/zone.tab
index ace7b575e6..8d4333ad9d 100644
--- a/timezone/zone.tab
+++ b/timezone/zone.tab
@@ -1,4 +1,4 @@
-# @(#)zone.tab	8.10
+# @(#)zone.tab	8.11
 #
 # TZ zone descriptions
 #
@@ -39,7 +39,7 @@ AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
 AQ	-6835+07758	Antarctica/Davis	Davis Station, Vestfold Hills
 AQ	-6617+11031	Antarctica/Casey	Casey Station, Bailey Peninsula
 AQ	-7824+10654	Antarctica/Vostok	Vostok Station, S Magnetic Pole
-AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Base, Terre Adelie
+AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
 AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
 AR	-3436-05827	America/Argentina/Buenos_Aires	Buenos Aires (BA, CF)
 AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF, SL)
@@ -65,7 +65,7 @@ AU	-3455+13835	Australia/Adelaide	South Australia
 AU	-1228+13050	Australia/Darwin	Northern Territory
 AU	-3157+11551	Australia/Perth	Western Australia - most locations
 AU	-3143+12852	Australia/Eucla	Western Australia - Eucla area
-AW	+1230-06858	America/Aruba
+AW	+1230-06958	America/Aruba
 AX	+6006+01957	Europe/Mariehamn
 AZ	+4023+04951	Asia/Baku
 BA	+4352+01825	Europe/Sarajevo
@@ -117,10 +117,10 @@ CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario an
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
 CA	+4843-09434	America/Rainy_River	Central Time - Rainy River & Fort Frances, Ontario
-CA	+6903-10505	America/Cambridge_Bay	Central Time - west Nunavut
 CA	+5024-10439	America/Regina	Central Standard Time - Saskatchewan - most locations
 CA	+5017-10750	America/Swift_Current	Central Standard Time - Saskatchewan - midwest
 CA	+5333-11328	America/Edmonton	Mountain Time - Alberta, east British Columbia & west Saskatchewan
+CA	+690650-1050310	America/Cambridge_Bay	Mountain Time - west Nunavut
 CA	+6227-11421	America/Yellowknife	Mountain Time - central Northwest Territories
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
@@ -175,7 +175,7 @@ FM	+0519+16259	Pacific/Kosrae	Kosrae
 FO	+6201-00646	Atlantic/Faroe
 FR	+4852+00220	Europe/Paris
 GA	+0023+00927	Africa/Libreville
-GB	+512830-0001845	Europe/London
+GB	+513030-0000731	Europe/London
 GD	+1203-06145	America/Grenada
 GE	+4143+04449	Asia/Tbilisi
 GF	+0456-05220	America/Cayenne
@@ -369,10 +369,10 @@ TW	+2503+12130	Asia/Taipei
 TZ	-0648+03917	Africa/Dar_es_Salaam
 UA	+5026+03031	Europe/Kiev	most locations
 UA	+4837+02218	Europe/Uzhgorod	Ruthenia
-UA	+4750+03510	Europe/Zaporozhye	Zaporozh'ye, E Lugansk
+UA	+4750+03510	Europe/Zaporozhye	Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
 UA	+4457+03406	Europe/Simferopol	central Crimea
 UG	+0019+03225	Africa/Kampala
-UM	+1700-16830	Pacific/Johnston	Johnston Atoll
+UM	+1645-16931	Pacific/Johnston	Johnston Atoll
 UM	+2813-17722	Pacific/Midway	Midway Islands
 UM	+1917+16637	Pacific/Wake	Wake Island
 US	+404251-0740023	America/New_York	Eastern Time
@@ -380,12 +380,13 @@ 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	+384038-0873143	America/Indiana/Vincennes	Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
 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 Counties
+US	+375711-0864541	America/Indiana/Tell_City	Central Time - Indiana - Perry County
 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
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index e8448c86d9..885662b07b 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -134,7 +134,7 @@ __END_NAMESPACE_STD
 __USING_NAMESPACE_STD(tm)
 
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Copy SRC to DEST.  */
 extern wchar_t *wcscpy (wchar_t *__restrict __dest,
 			__const wchar_t *__restrict __src) __THROW;
@@ -157,7 +157,7 @@ extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
 /* Compare N wide-characters of S1 and S2.  */
 extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
      __THROW __attribute_pure__;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_GNU
 /* Compare S1 and S2, ignoring case.  */
@@ -178,7 +178,7 @@ extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
 			  size_t __n, __locale_t __loc) __THROW;
 #endif
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Compare S1 and S2, both interpreted as appropriate to the
    LC_COLLATE category of the current locale.  */
 extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
@@ -187,7 +187,7 @@ extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
    `wcscoll' to the original strings.  */
 extern size_t wcsxfrm (wchar_t *__restrict __s1,
 		       __const wchar_t *__restrict __s2, size_t __n) __THROW;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_GNU
 /* Similar to the two functions above but take the information from
@@ -208,14 +208,14 @@ extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
 extern wchar_t *wcsdup (__const wchar_t *__s) __THROW __attribute_malloc__;
 #endif
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Find the first occurrence of WC in WCS.  */
 extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
      __THROW __attribute_pure__;
 /* Find the last occurrence of WC in WCS.  */
 extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
      __THROW __attribute_pure__;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_GNU
 /* This function is similar to `wcschr'.  But it returns a pointer to
@@ -224,7 +224,7 @@ extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
      __THROW __attribute_pure__;
 #endif
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Return the length of the initial segmet of WCS which
    consists entirely of wide characters not in REJECT.  */
 extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
@@ -247,7 +247,7 @@ extern wchar_t *wcstok (wchar_t *__restrict __s,
 
 /* Return the number of wide characters in S.  */
 extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_XOPEN
 /* Another name for `wcsstr' from XPG4.  */
@@ -262,7 +262,7 @@ extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
 #endif
 
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Search N wide characters of S for C.  */
 extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
      __THROW __attribute_pure__;
@@ -283,7 +283,7 @@ extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
 
 /* Set N wide characters of S to C.  */
 extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_GNU
 /* Copy N wide characters of SRC to DEST and return pointer to following
@@ -294,7 +294,7 @@ extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
 #endif
 
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Determine whether C constitutes a valid (one-byte) multibyte
    character.  */
 extern wint_t btowc (int __c) __THROW;
@@ -322,7 +322,7 @@ extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
 			mbstate_t *__restrict __ps) __THROW;
 extern size_t mbrlen (__const char *__restrict __s, size_t __n,
 		      mbstate_t *__restrict __ps) __THROW;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 #ifdef __USE_EXTERN_INLINES
 /* Define inline function as optimization.  */
@@ -349,7 +349,7 @@ __NTH (mbrlen (__const char *__restrict __s, size_t __n,
 	  ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
 #endif
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Write wide character representation of multibyte character string
    SRC to DST.  */
 extern size_t mbsrtowcs (wchar_t *__restrict __dst,
@@ -361,7 +361,7 @@ extern size_t mbsrtowcs (wchar_t *__restrict __dst,
 extern size_t wcsrtombs (char *__restrict __dst,
 			 __const wchar_t **__restrict __src, size_t __len,
 			 mbstate_t *__restrict __ps) __THROW;
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 
 #ifdef	__USE_GNU
@@ -391,21 +391,25 @@ extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW;
 #endif	/* Use X/Open.  */
 
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Convert initial portion of the wide string NPTR to `double'
    representation.  */
 extern double wcstod (__const wchar_t *__restrict __nptr,
 		      wchar_t **__restrict __endptr) __THROW;
+__END_NAMESPACE_STD
 
 #ifdef __USE_ISOC99
+__BEGIN_NAMESPACE_C99
 /* Likewise for `float' and `long double' sizes of floating-point numbers.  */
 extern float wcstof (__const wchar_t *__restrict __nptr,
 		     wchar_t **__restrict __endptr) __THROW;
 extern long double wcstold (__const wchar_t *__restrict __nptr,
 			    wchar_t **__restrict __endptr) __THROW;
+__END_NAMESPACE_C99
 #endif /* C99 */
 
 
+__BEGIN_NAMESPACE_STD
 /* Convert initial portion of wide string NPTR to `long int'
    representation.  */
 extern long int wcstol (__const wchar_t *__restrict __nptr,
@@ -416,8 +420,10 @@ extern long int wcstol (__const wchar_t *__restrict __nptr,
 extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
 				  wchar_t **__restrict __endptr, int __base)
      __THROW;
+__END_NAMESPACE_STD
 
 #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU)
+__BEGIN_NAMESPACE_C99
 /* Convert initial portion of wide string NPTR to `long long int'
    representation.  */
 __extension__
@@ -431,8 +437,8 @@ __extension__
 extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
 					wchar_t **__restrict __endptr,
 					int __base) __THROW;
-#endif /* ISO C99 or GCC and GNU.  */
 __END_NAMESPACE_C99
+#endif /* ISO C99 or GCC and GNU.  */
 
 #if defined __GNUC__ && defined __USE_GNU
 /* Convert initial portion of wide string NPTR to `long long int'
@@ -522,7 +528,7 @@ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
 #endif
 
 #if defined __USE_ISOC95 || defined __USE_UNIX98
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 
 /* Select orientation for stream.  */
 extern int fwide (__FILE *__fp, int __mode) __THROW;
@@ -618,7 +624,7 @@ extern int __isoc99_swscanf (__const wchar_t *__restrict __s,
 #  endif
 # endif
 
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 #endif /* Use ISO C95, C99 and Unix98. */
 
 #ifdef __USE_ISOC99
@@ -678,7 +684,7 @@ __END_NAMESPACE_C99
 #endif /* Use ISO C99. */
 
 
-__BEGIN_NAMESPACE_C99
+__BEGIN_NAMESPACE_STD
 /* Read a character from STREAM.
 
    These functions are possible cancellation points and therefore not
@@ -728,7 +734,7 @@ extern int fputws (__const wchar_t *__restrict __ws,
    This function is a possible cancellation points and therefore not
    marked with __THROW.  */
 extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
-__END_NAMESPACE_C99
+__END_NAMESPACE_STD
 
 
 #ifdef __USE_GNU
-- 
cgit v1.2.3