diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2007-10-14 20:56:52 +0000 |
|---|---|---|
| committer | Jakub Jelinek <jakub@redhat.com> | 2007-10-14 20:56:52 +0000 |
| commit | a33c43a5aefbbb2d1e00432ba034d256af0008ae (patch) | |
| tree | 80aa9060de68814fb13960b308a0faa95fb8ba94 | |
| parent | 4cee966cabbbd52c38260dff95f5ab43772ba5d9 (diff) | |
| download | glibc-a33c43a5aefbbb2d1e00432ba034d256af0008ae.tar.xz glibc-a33c43a5aefbbb2d1e00432ba034d256af0008ae.zip | |
Updated to fedora-glibc-20071014T1847
| -rw-r--r-- | ChangeLog | 98 | ||||
| -rw-r--r-- | elf/cache.c | 1 | ||||
| -rw-r--r-- | fedora/branch.mk | 4 | ||||
| -rw-r--r-- | fedora/glibc.spec.in | 8 | ||||
| -rw-r--r-- | iconv/gconv_simple.c | 16 | ||||
| -rw-r--r-- | include/features.h | 15 | ||||
| -rw-r--r-- | include/stdio.h | 1 | ||||
| -rw-r--r-- | include/time.h | 3 | ||||
| -rw-r--r-- | intl/dcigettext.c | 1 | ||||
| -rw-r--r-- | libio/Makefile | 4 | ||||
| -rw-r--r-- | libio/__freading.c | 5 | ||||
| -rw-r--r-- | libio/ftello.c | 3 | ||||
| -rw-r--r-- | libio/tst-ext2.c | 58 | ||||
| -rw-r--r-- | locale/programs/ld-collate.c | 62 | ||||
| -rw-r--r-- | locale/programs/repertoire.c | 3 | ||||
| -rw-r--r-- | misc/Makefile | 2 | ||||
| -rw-r--r-- | nscd/nscd_getai.c | 4 | ||||
| -rw-r--r-- | nscd/nscd_getgr_r.c | 76 | ||||
| -rw-r--r-- | nscd/nscd_gethst_r.c | 4 | ||||
| -rw-r--r-- | nscd/nscd_getpw_r.c | 4 | ||||
| -rw-r--r-- | nscd/nscd_getserv_r.c | 4 | ||||
| -rw-r--r-- | nscd/nscd_helper.c | 103 | ||||
| -rw-r--r-- | posix/fnmatch_loop.c | 13 | ||||
| -rw-r--r-- | posix/regcomp.c | 10 | ||||
| -rw-r--r-- | posix/regexec.c | 14 | ||||
| -rw-r--r-- | sysdeps/posix/getaddrinfo.c | 9 | ||||
| -rw-r--r-- | time/tzfile.c | 249 | ||||
| -rw-r--r-- | time/tzset.c | 230 | ||||
| -rw-r--r-- | timezone/tst-timezone.c | 3 |
29 files changed, 655 insertions, 352 deletions
@@ -1,3 +1,101 @@ +2007-10-14 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/posix/getaddrinfo.c (struct sort_result): Add + service_order. + (rfc3484_sort): Make sure that even of qsort doesn't support + stable sorting it is stable by comparing service_order. + (getaddrinfo): Initialize service_order. + + * include/time.h: Declare __tzset_parse_tz and __tzset_compute. + * time/tzset.c (tzset_internal): Break TZ string parsing out into + __tzset_parse_tz and updating of daylight, timezone, tzname into + update_vars. + (__tz_compute): Renamed from tz_compute. Take additional parameters. + (__tz_convert): Updating of tm_isdst, tm_zone, and tm_gmtoff now + happens in __tz_compute. + * time/tzfile.c (__tzfile_read): Also read TZ string. + (find_transition): Fold into __tzfile_compute. + (__tzfile_compute): For times beyond the last transition try to + use the TZ string. + * timezone/tst-timezone.c: Information in daylight and tzname does + change for Asia/Tokyo timezone with more concrete information. + Remove the test. + + * include/stdio.h: Add libc_hidden_proto for ftello. + * libio/ftello.c: Add libc_hidden_def. + + [BZ #1140] + * time/tzfile.c (__tzfile_compute): Compute tzname[] values based + on the specified time and not the last entries in the file. Move + code to determine tzname[] to... + (find_transition): ...here. Add ugly guess for times before the + first transition. + +2007-10-13 Ulrich Drepper <drepper@redhat.com> + + [BZ #3195] + * nscd/nscd_getai.c (__nscd_getai): Set errno to 0 in case we found + no entry. + * nscd/nscd_getgr.c (nscd_getgr_r): Likewise. + * nscd/nscd_gethst_r.c (nscd_gethst_r): Likewise. + * nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise. + * nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise. + + * nscd/nscd_getgr_r.c (nscd_getgr_r): Optimize a bit: use simpler + read mechanism when there are no group members and avoid no-op + read syscall in this case. + + [BZ #3242] + * nscd/nscd_helper.c (wait_on_socket): Take timeout as parameter. + (__readall): If reading failed due to EAGAIN error wait a bit + and possibly try again. + (__readvall): Likewise. + +2007-10-13 Bruno Haible <bruno@clisp.org> + + * intl/dcigettext.c (_nl_find_msg): Unlock the conversions_lock + when we cannot recode the message. + +2007-10-13 Ulrich Drepper <drepper@redhat.com> + + [BZ #4359] + * libio/__freading.c (__freading): Don't return true for + write-only streams. For read/write streams, check whether we + performed a read operation already. + * libio/Makefile (tests): Add tst-ext2. + * libio/tst-ext2.c: New file. + +2007-10-12 Ulrich Drepper <drepper@redhat.com> + + * locale/programs/repertoire.c (repertoire_read): Always free + memory for repertoire file name [Coverity CID 270]. + + * elf/cache.c (save_aux_cache): Free memory allocated for + temporary file name [Coverity CID 267]. + +2007-10-12 Jakub Jelinek <jakub@redhat.com> + + * misc/Makefile (headers): Add bits/error.h. + +2007-10-12 Ulrich Drepper <drepper@redhat.com> + + * posix/fnmatch_loop.c: Take rule index returned as part of + findidx return value into account when accessing weights. + * posix/regcomp.c: Likewise. + * posix/regexec.c: Likewise. + + * locale/programs/ld-collate.c (collate_read): Optimize a bit. + (skip_to): Fix problems with parameter of elifdef/elifndef. + +2007-10-11 Ulrich Drepper <drepper@redhat.com> + + * iconv/gconv_simple.c: Add some branch prediction. + +2007-10-12 Jakub Jelinek <jakub@redhat.com> + + * locale/programs/ld-collate.c (collate_read): If ignore_content + and nowtok is tok_define, eat any tok_eol tokens. + 2007-10-11 Jakub Jelinek <jakub@redhat.com> * sysdeps/gnu/netinet/tcp.h: Include sys/socket.h if __USE_MISC. diff --git a/elf/cache.c b/elf/cache.c index 9a600ea535..b8561e4b5f 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -800,5 +800,6 @@ save_aux_cache (const char *aux_cache_name) out_fail: /* Free allocated memory. */ + free (temp_name); free (file_entries); } diff --git a/fedora/branch.mk b/fedora/branch.mk index ac6349ee5d..c9056799ce 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-11 16:36 UTC -fedora-sync-tag := fedora-glibc-20071011T1636 +fedora-sync-date := 2007-10-14 18:47 UTC +fedora-sync-tag := fedora-glibc-20071014T1847 diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 11d7d0eacd..084231ca17 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1,4 +1,4 @@ -%define glibcrelease 19 +%define glibcrelease 20 %define run_glibc_tests 1 %define auxarches i586 i686 athlon sparcv9v sparc64v alphaev6 %define xenarches i686 athlon @@ -1010,6 +1010,12 @@ rm -f *.filelist* %endif %changelog +* Sun Oct 14 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-20 +- install <bits/error.h> (#330031) +- disable -D_FORTIFY_SOURCE{,=2} support (with a warning) for + GCC 3.4.x and earlier(#327641) +- misc fixes (BZ#1140, BZ#3195, BZ#3242, BZ#4359) + * Thu Oct 11 2007 Jakub Jelinek <jakub@redhat.com> 2.6.90-19 - fix <netinet/tcp.h> - simple preprocessor in localedef, fix de_DE collation with it diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c index 343c27521f..ec8f38a962 100644 --- a/iconv/gconv_simple.c +++ b/iconv/gconv_simple.c @@ -1,5 +1,5 @@ /* Simple transformations functions. - Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1997-2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -880,7 +880,7 @@ ucs4le_internal_loop_single (struct __gconv_step *step, { \ uint32_t wc = *((const uint32_t *) inptr); \ \ - if (wc < 0x80) \ + if (__builtin_expect (wc < 0x80, 1)) \ /* It's an one byte sequence. */ \ *outptr++ = (unsigned char) wc; \ else if (__builtin_expect (wc <= 0x7fffffff, 1)) \ @@ -940,21 +940,19 @@ ucs4le_internal_loop_single (struct __gconv_step *step, #define LOOPFCT FROM_LOOP #define BODY \ { \ - uint32_t ch; \ - uint_fast32_t cnt; \ - uint_fast32_t i; \ - \ /* Next input byte. */ \ - ch = *inptr; \ + uint32_t ch = *inptr; \ \ - if (ch < 0x80) \ + if (__builtin_expect (ch < 0x80, 1)) \ { \ /* One byte sequence. */ \ - cnt = 1; \ ++inptr; \ } \ else \ { \ + uint_fast32_t cnt; \ + uint_fast32_t i; \ + \ if (ch >= 0xc2 && ch < 0xe0) \ { \ /* We expect two bytes. The first byte cannot be 0xc0 or 0xc1, \ diff --git a/include/features.h b/include/features.h index 0e471875cb..3ab68b67cd 100644 --- a/include/features.h +++ b/include/features.h @@ -282,14 +282,13 @@ #endif #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ - && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 \ - && (__GNUC_PREREQ (4, 1) \ - || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \ - || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \ - && __GNUC_MINOR__ == 4 \ - && (__GNUC_PATCHLEVEL__ > 2 \ - || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8)))) -# if _FORTIFY_SOURCE > 1 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 +# if !__GNUC_PREREQ (4, 1) +# ifdef __GNUC_RH_RELEASE__ +# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later +# endif +# define __USE_FORTIFY_LEVEL 0 +# elif _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 diff --git a/include/stdio.h b/include/stdio.h index 084c02ea1e..3c11037490 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -138,6 +138,7 @@ libc_hidden_proto (rewind) libc_hidden_proto (fileno) libc_hidden_proto (fwrite) libc_hidden_proto (fseek) +libc_hidden_proto (ftello) libc_hidden_proto (fflush_unlocked) libc_hidden_proto (fread_unlocked) libc_hidden_proto (fwrite_unlocked) diff --git a/include/time.h b/include/time.h index ed6cb3669f..e896406db4 100644 --- a/include/time.h +++ b/include/time.h @@ -46,6 +46,9 @@ extern void __tzfile_compute (time_t timer, int use_localtime, struct tm *tp); extern void __tzfile_default (const char *std, const char *dst, long int stdoff, long int dstoff); +extern void __tzset_parse_tz (const char *tz); +extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) + __THROW internal_function; /* Subroutine of `mktime'. Return the `time_t' representation of TP and normalize TP, given that a `struct tm *' maps to a `time_t' as performed diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 55dcaabd80..a2cd8014c3 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -974,6 +974,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp) translation at all. */ if (__builtin_expect (r != __GCONV_NULCONV, 1)) { + __libc_rwlock_unlock (domain->conversions_lock); free ((char *) encoding); return NULL; } diff --git a/libio/Makefile b/libio/Makefile index 553fbda74a..31fac70cfd 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1995-2002,2003,2004,2006 Free Software Foundation, Inc. +# Copyright (C) 1995-2002,2003,2004,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 @@ -48,7 +48,7 @@ routines := \ libc_fatal fmemopen tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \ + tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 tst-fopenloc \ tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \ tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \ tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \ diff --git a/libio/__freading.c b/libio/__freading.c index 37200bba78..43e50bce75 100644 --- a/libio/__freading.c +++ b/libio/__freading.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,5 +22,6 @@ int __freading (FILE *fp) { return ((fp->_flags & _IO_NO_WRITES) - || (fp->_flags & _IO_CURRENTLY_PUTTING) == 0); + || ((fp->_flags & (_IO_CURRENTLY_PUTTING | _IO_NO_READS)) == 0 + && fp->_IO_read_base != NULL)); } diff --git a/libio/ftello.c b/libio/ftello.c index e58daacad4..d250e55c04 100644 --- a/libio/ftello.c +++ b/libio/ftello.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004 +/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -63,3 +63,4 @@ ftello (fp) } return pos; } +libc_hidden_def (ftello) diff --git a/libio/tst-ext2.c b/libio/tst-ext2.c new file mode 100644 index 0000000000..ed72efa0c7 --- /dev/null +++ b/libio/tst-ext2.c @@ -0,0 +1,58 @@ +#include <stdio.h> +#include <stdio_ext.h> + + +static char *fname; + +#define PREPARE(argc, argv) \ + do { \ + int fd = create_temp_file ("tst-ext2", &fname); \ + if (fd == -1) \ + { \ + puts ("cannot create temporary file"); \ + exit (1); \ + } \ + close (fd); \ + } while (0) + + +static int +do_test (void) +{ + int res = 0; + + FILE *fp; + + fp = fopen (fname, "w"); + printf ("Initial state for write-only stream: %d %d\n", + __freading (fp) != 0, __fwriting (fp) != 0); + res |= ((__freading (fp) != 0) != 0 + || (__fwriting (fp) != 0) != 1); + fclose (fp); + + fp = fopen (fname, "r"); + printf ("Initial state for read-only stream: %d %d\n", + __freading (fp) != 0, __fwriting (fp) != 0); + res |= ((__freading (fp) != 0) != 1 + || (__fwriting (fp) != 0) != 0); + fclose (fp); + + fp = fopen (fname, "r+"); + printf ("Initial state for read-write stream: %d %d\n", + __freading (fp) != 0, __fwriting (fp) != 0); + res |= ((__freading (fp) != 0) != 0 + || (__fwriting (fp) != 0) != 0); + fclose (fp); + + fp = fopen (fname, "w+"); + printf ("Initial state for read-write stream: %d %d\n", + __freading (fp) != 0, __fwriting (fp) != 0); + res |= ((__freading (fp) != 0) != 0 + || (__fwriting (fp) != 0) != 0); + fclose (fp); + + return res; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index 6d8f3fb2f0..bf22a2c47b 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -2662,13 +2662,16 @@ skip_to (struct linereader *ldfile, struct locale_collate_t *collate, if (nowtok == tok_eof || nowtok == tok_end) return nowtok; } - else if ((!to_endif && (nowtok == tok_else || nowtok == tok_elifdef - || nowtok == tok_elifndef)) - || nowtok == tok_endif) + else if (nowtok == tok_endif || (!to_endif && nowtok == tok_else)) { lr_ignore_rest (ldfile, 1); return nowtok; } + else if (!to_endif && (nowtok == tok_elifdef || nowtok == tok_elifndef)) + { + /* Do not read the rest of the line. */ + return nowtok; + } else if (nowtok == tok_else) { lr_error (ldfile, _("%s: more then one 'else'"), "LC_COLLATE"); @@ -2709,43 +2712,38 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, /* The rest of the line containing `LC_COLLATE' must be free. */ lr_ignore_rest (ldfile, 1); - do - { - now = lr_token (ldfile, charmap, result, NULL, verbose); - nowtok = now->tok; - } - while (nowtok == tok_eol); - - while (nowtok == tok_define) + while (1) { - if (ignore_content) + do { - lr_ignore_rest (ldfile, 0); - continue; + now = lr_token (ldfile, charmap, result, NULL, verbose); + nowtok = now->tok; } + while (nowtok == tok_eol); - arg = lr_token (ldfile, charmap, result, NULL, verbose); - if (arg->tok != tok_ident) - SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE"); + if (nowtok != tok_define) + break; + + if (ignore_content) + lr_ignore_rest (ldfile, 0); else { - /* Simply add the new symbol. */ - struct name_list *newsym = xmalloc (sizeof (*newsym) |
