diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-04-24 21:09:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-04-24 21:09:14 +0000 |
commit | 0e15c4b6b59de21ef1f6f446a644ac3ed041016c (patch) | |
tree | 91bf4e1cc3603968d35d99d386aa004285bd585e | |
parent | d88f7ae3e7cbef651d9c62935a501c1cd5170a7f (diff) | |
download | glibc-0e15c4b6b59de21ef1f6f446a644ac3ed041016c.tar glibc-0e15c4b6b59de21ef1f6f446a644ac3ed041016c.tar.gz glibc-0e15c4b6b59de21ef1f6f446a644ac3ed041016c.tar.bz2 glibc-0e15c4b6b59de21ef1f6f446a644ac3ed041016c.zip |
Update.
2002-04-24 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (open_verify): Correct __lseek parameters.
Patch by Simon Hildrew <simon@hildrew.net> [PR libc/3354].
2002-04-23 H.J. Lu <hjl@gnu.org>
* include/math.h (isfinite): Fix a typo.
2002-04-24 Ulrich Drepper <drepper@redhat.com>
* libio/bug-ungetwc2.c (test_locale): Use the de_DE.UTF-8 locale
which is created by the test suite.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/iso-2002-kr.c (MAX_NEEDED_FROM): Set to 4.
(BODY for FROM_LOOP): Fix comparisons between inptr and inend.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/johab.c (BODY for FROM_LOOP): Change type of i, m, f,
to avoid gcc warning.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Fix modification mask
of data->__statep->__count.
2002-04-20 Bruno Haible <bruno@clisp.org>
* iconvdata/euc-jisx0213.c (BODY for TO_LOOP): Really ignore Unicode
tag characters.
* iconvdata/shift_jisx0213.c (BODY for TO_LOOP): Likewise.
* sysdeps/unix/sysv/linux/x86_64/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/x86_64/dl-cache.h: New file.
-rw-r--r-- | ChangeLog | 39 | ||||
-rw-r--r-- | elf/dl-load.c | 6 | ||||
-rw-r--r-- | iconvdata/euc-jisx0213.c | 16 | ||||
-rw-r--r-- | iconvdata/iso-2022-jp.c | 4 | ||||
-rw-r--r-- | iconvdata/iso-2022-kr.c | 11 | ||||
-rw-r--r-- | iconvdata/johab.c | 10 | ||||
-rw-r--r-- | iconvdata/shift_jisx0213.c | 13 | ||||
-rw-r--r-- | include/math.h | 4 | ||||
-rw-r--r-- | libio/bug-ungetwc2.c | 8 | ||||
-rw-r--r-- | localedata/ChangeLog | 5 |
10 files changed, 79 insertions, 37 deletions
@@ -1,3 +1,38 @@ +2002-04-24 Ulrich Drepper <drepper@redhat.com> + + * elf/dl-load.c (open_verify): Correct __lseek parameters. + Patch by Simon Hildrew <simon@hildrew.net> [PR libc/3354]. + +2002-04-23 H.J. Lu <hjl@gnu.org> + + * include/math.h (isfinite): Fix a typo. + +2002-04-24 Ulrich Drepper <drepper@redhat.com> + + * libio/bug-ungetwc2.c (test_locale): Use the de_DE.UTF-8 locale + which is created by the test suite. + +2002-04-20 Bruno Haible <bruno@clisp.org> + + * iconvdata/iso-2002-kr.c (MAX_NEEDED_FROM): Set to 4. + (BODY for FROM_LOOP): Fix comparisons between inptr and inend. + +2002-04-20 Bruno Haible <bruno@clisp.org> + + * iconvdata/johab.c (BODY for FROM_LOOP): Change type of i, m, f, + to avoid gcc warning. + +2002-04-20 Bruno Haible <bruno@clisp.org> + + * iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Fix modification mask + of data->__statep->__count. + +2002-04-20 Bruno Haible <bruno@clisp.org> + + * iconvdata/euc-jisx0213.c (BODY for TO_LOOP): Really ignore Unicode + tag characters. + * iconvdata/shift_jisx0213.c (BODY for TO_LOOP): Likewise. + 2002-04-24 Roland McGrath <roland@frob.com> * sysdeps/mach/alpha/syscall.S: Don't use .frame, ENTRY will have it; @@ -30,9 +65,9 @@ 2002-04-22 Andreas Jaeger <aj@suse.de> - * sysdeps/unix/sysv/linux/x86_64/ldconfig.h: New. + * sysdeps/unix/sysv/linux/x86_64/ldconfig.h: New file. - * sysdeps/unix/sysv/linux/x86_64/dl-cache.h: New. + * sysdeps/unix/sysv/linux/x86_64/dl-cache.h: New file. * sysdeps/unix/sysv/linux/x86_64/vfork.S: Use %rdi as temp register instead of destroying %rbx. diff --git a/elf/dl-load.c b/elf/dl-load.c index b404205d0f..fd80be60bc 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -863,7 +863,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp, else { phdr = alloca (maplength); - __lseek (fd, SEEK_SET, header->e_phoff); + __lseek (fd, header->e_phoff, SEEK_SET); if (__libc_read (fd, (void *) phdr, maplength) != maplength) { errstring = N_("cannot read file data"); @@ -1416,7 +1416,7 @@ open_verify (const char *name, struct filebuf *fbp) else { phdr = alloca (maplength); - __lseek (fd, SEEK_SET, ehdr->e_phoff); + __lseek (fd, ehdr->e_phoff, SEEK_SET); if (__libc_read (fd, (void *) phdr, maplength) != maplength) { read_error: @@ -1434,7 +1434,7 @@ open_verify (const char *name, struct filebuf *fbp) abi_note = (void *) (fbp->buf + ph->p_offset); else { - __lseek (fd, SEEK_SET, ph->p_offset); + __lseek (fd, ph->p_offset, SEEK_SET); if (__libc_read (fd, (void *) abi_note_buf, 32) != 32) goto read_error; diff --git a/iconvdata/euc-jisx0213.c b/iconvdata/euc-jisx0213.c index c696f94ee8..a0062c8847 100644 --- a/iconvdata/euc-jisx0213.c +++ b/iconvdata/euc-jisx0213.c @@ -366,8 +366,8 @@ static const struct } \ else \ { \ - ch = ucs4_to_jisx0213 (ch); \ - if (ch == 0) \ + uint32_t jch = ucs4_to_jisx0213 (ch); \ + if (jch == 0) \ { \ UNICODE_TAG_HANDLER (ch, 4); \ \ @@ -375,19 +375,19 @@ static const struct STANDARD_ERR_HANDLER (4); \ } \ \ - if (ch & 0x0080) \ + if (jch & 0x0080) \ { \ /* A possible match in comp_table_data. We have to buffer it. */\ \ /* We know it's a JISX 0213 plane 1 character. */ \ - assert ((ch & 0x8000) == 0); \ + assert ((jch & 0x8000) == 0); \ \ - *statep = (ch | 0x8080) << 3; \ + *statep = (jch | 0x8080) << 3; \ inptr += 4; \ continue; \ } \ \ - if (ch & 0x8000) \ + if (jch & 0x8000) \ { \ /* JISX 0213 plane 2. */ \ if (__builtin_expect (outptr + 2 >= outend, 0)) \ @@ -406,8 +406,8 @@ static const struct break; \ } \ } \ - *outptr++ = (ch >> 8) | 0x80; \ - *outptr++ = (ch & 0xff) | 0x80; \ + *outptr++ = (jch >> 8) | 0x80; \ + *outptr++ = (jch & 0xff) | 0x80; \ } \ \ inptr += 4; \ diff --git a/iconvdata/iso-2022-jp.c b/iconvdata/iso-2022-jp.c index af840dd0a7..80fd033498 100644 --- a/iconvdata/iso-2022-jp.c +++ b/iconvdata/iso-2022-jp.c @@ -1,5 +1,5 @@ /* Conversion module for ISO-2022-JP and ISO-2022-JP-2. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -237,7 +237,7 @@ gconv_end (struct __gconv_step *data) *outbuf++ = '('; \ *outbuf++ = 'B'; \ /* Note that this also clears the G2 designation. */ \ - data->__statep->__count &= ~7; \ + data->__statep->__count &= 7; \ data->__statep->__count |= ASCII_set; \ } \ } \ diff --git a/iconvdata/iso-2022-kr.c b/iconvdata/iso-2022-kr.c index 9846d920d9..e576e2a083 100644 --- a/iconvdata/iso-2022-kr.c +++ b/iconvdata/iso-2022-kr.c @@ -1,5 +1,5 @@ /* Conversion module for ISO-2022-KR. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -40,7 +40,7 @@ #define FROM_LOOP from_iso2022kr_loop #define TO_LOOP to_iso2022kr_loop #define MIN_NEEDED_FROM 1 -#define MAX_NEEDED_FROM 3 +#define MAX_NEEDED_FROM 4 #define MIN_NEEDED_TO 4 #define MAX_NEEDED_TO 4 #define PREPARE_LOOP \ @@ -139,12 +139,11 @@ enum switching is done using the SI and SO bytes. But we have to \ recognize `Esc $ ) C' since this is a kind of flag for this \ encoding. We simply ignore it. */ \ - if (__builtin_expect (inptr + 1 > inend, 0) \ + if (__builtin_expect (inptr + 2 > inend, 0) \ || (inptr[1] == '$' \ - && (__builtin_expect (inptr + 2 > inend, 0) \ + && (__builtin_expect (inptr + 3 > inend, 0) \ || (inptr[2] == ')' \ - && __builtin_expect (inptr + 3 > inend, 0))))) \ - \ + && __builtin_expect (inptr + 4 > inend, 0))))) \ { \ result = __GCONV_INCOMPLETE_INPUT; \ break; \ diff --git a/iconvdata/johab.c b/iconvdata/johab.c index 83a76d1ff0..a94270a1e0 100644 --- a/iconvdata/johab.c +++ b/iconvdata/johab.c @@ -215,15 +215,15 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) if (__builtin_expect (ch <= 0xd3, 1)) \ { \ /* Hangul */ \ - uint_fast32_t i, m, f; \ + int_fast32_t i, m, f; \ \ i = init[(idx & 0x7c00) >> 10]; \ m = mid[(idx & 0x03e0) >> 5]; \ f = final[idx & 0x001f]; \ \ - if (__builtin_expect (i, 0) == -1 \ - || __builtin_expect (m, 0) == -1 \ - || __builtin_expect (f, 0) == -1) \ + if (__builtin_expect (i == -1, 0) \ + || __builtin_expect (m == -1, 0) \ + || __builtin_expect (f == -1, 0)) \ { \ /* This is illegal. */ \ if (! ignore_errors_p ()) \ @@ -243,7 +243,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2) ch = init_to_ucs[i - 1]; \ else if (i == 0 && m > 0 && f == 0) \ ch = 0x314e + m; /* 0x314f + m - 1 */ \ - else if (__builtin_expect (i | m, 0) == 0 \ + else if (__builtin_expect ((i | m) == 0, 1) \ && __builtin_expect (f > 0, 1)) \ ch = final_to_ucs[f - 1]; /* round trip?? */ \ else \ diff --git a/iconvdata/shift_jisx0213.c b/iconvdata/shift_jisx0213.c index 0c1ca722c3..ec792009f0 100644 --- a/iconvdata/shift_jisx0213.c +++ b/iconvdata/shift_jisx0213.c @@ -352,9 +352,8 @@ static const struct else \ { \ unsigned int s1, s2; \ - \ - ch = ucs4_to_jisx0213 (ch); \ - if (ch == 0) \ + uint32_t jch = ucs4_to_jisx0213 (ch); \ + if (jch == 0) \ { \ UNICODE_TAG_HANDLER (ch, 4); \ \ @@ -363,8 +362,8 @@ static const struct } \ \ /* Convert it to shifted representation. */ \ - s1 = ch >> 8; \ - s2 = ch & 0x7f; \ + s1 = jch >> 8; \ + s2 = jch & 0x7f; \ s1 -= 0x21; \ s2 -= 0x21; \ if (s1 >= 0x5e) \ @@ -390,12 +389,12 @@ static const struct else \ s2 += 0x41; \ \ - if (ch & 0x0080) \ + if (jch & 0x0080) \ { \ /* A possible match in comp_table_data. We have to buffer it. */\ \ /* We know it's a JISX 0213 plane 1 character. */ \ - assert ((ch & 0x8000) == 0); \ + assert ((jch & 0x8000) == 0); \ \ *statep = ((s1 << 8) | s2) << 3; \ inptr += 4; \ diff --git a/include/math.h b/include/math.h index 15ad10331a..1dd1a1454a 100644 --- a/include/math.h +++ b/include/math.h @@ -29,8 +29,8 @@ extern int __isnanl_internal (long double __value) # undef isfinite # ifdef __NO_LONG_DOUBLE_MATH # define isfinite(x) \ - (sizeof (x) == (sizeof (float) \ - ? INTUSE(__finitef) (x) : INTUSE(__finite) (x))) + (sizeof (x) == sizeof (float) \ + ? INTUSE(__finitef) (x) : INTUSE(__finite) (x)) # else # define isfinite(x) \ (sizeof (x) == sizeof (float) \ diff --git a/libio/bug-ungetwc2.c b/libio/bug-ungetwc2.c index 07fff695af..b901fc01e3 100644 --- a/libio/bug-ungetwc2.c +++ b/libio/bug-ungetwc2.c @@ -6,7 +6,7 @@ #include <locale.h> #include <wchar.h> -const char test_locale[] = "en_US.UTF-8"; +const char test_locale[] = "de_DE.UTF-8"; const wchar_t write_wchars[] = {L'A', 0x00C4, L'B', L'\0'}; /* `0x00C4' is A with diaeresis. */ size_t last_pos = 2; /* Which character is last one to read. */ @@ -55,6 +55,7 @@ do_test (void) /* Output to the file. */ if ((fp = fdopen (fd, "w")) == NULL) { + setlocale (LC_ALL, "C"); fprintf (stderr, "Cannot make `%s' file.\n", fname); exit (EXIT_FAILURE); } @@ -64,7 +65,10 @@ do_test (void) /* Read from the file. */ fp = fopen (fname, "r"); if (fp == NULL) - error (EXIT_FAILURE, errno, "cannot open %s", fname); + { + setlocale (LC_ALL, "C"); + error (EXIT_FAILURE, errno, "cannot open %s", fname); + } printf ("%s is opened.\n", fname); diff --git a/localedata/ChangeLog b/localedata/ChangeLog index ec4936fe0e..fbccb7f621 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2002-04-19 Bruno Haible <bruno@clisp.org> + + * charmaps/ISO-IR-209: Fix the Unicode values for LETTER H WITH CARON. + * charmaps/MAC-SAMI: Likewise. + 2002-04-15 Bruno Haible <bruno@clisp.org> * charmaps/EUC-JISX0213: New file. |