Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 24 Apr 2002 21:09:14 +0000 (21:09 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 24 Apr 2002 21:09:14 +0000 (21:09 +0000)
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.

ChangeLog
elf/dl-load.c
iconvdata/euc-jisx0213.c
iconvdata/iso-2022-jp.c
iconvdata/iso-2022-kr.c
iconvdata/johab.c
iconvdata/shift_jisx0213.c
include/math.h
libio/bug-ungetwc2.c
localedata/ChangeLog

index 39c756b..4f5b306 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index b404205..fd80be6 100644 (file)
@@ -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;
 
index c696f94..a0062c8 100644 (file)
@@ -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;                                                                      \
index af840dd..80fd033 100644 (file)
@@ -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;                           \
            }                                                                 \
        }                                                                     \
index 9846d92..e576e2a 100644 (file)
@@ -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;                                                            \
index 83a76d1..a94270a 100644 (file)
@@ -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                                                          \
index 0c1ca72..ec79200 100644 (file)
@@ -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;                                                       \
index 15ad103..1dd1a14 100644 (file)
@@ -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)                                           \
index 07fff69..b901fc0 100644 (file)
@@ -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);
 
index ec4936f..fbccb7f 100644 (file)
@@ -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.