]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconvdata/cp932.c
support: Expose sbindir as support_sbindir_prefix
[thirdparty/glibc.git] / iconvdata / cp932.c
index b8269ac061ad72d963fc4eb5d9f32154f38a654f..4b180c3c03cec8d44de3d5179530c294b3aec29b 100644 (file)
@@ -1,5 +1,5 @@
 /* Mapping tables for CP932 handling.
-   Copyright (C) 1997-2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by MORIYAMA Masayuki <msyk@mtg.biglobe.ne.jp>, 2003.
 
@@ -4534,6 +4534,7 @@ static const char from_ucs4_extra[229][2] =
 #define MIN_NEEDED_FROM                1
 #define MAX_NEEDED_FROM                2
 #define MIN_NEEDED_TO          4
+#define ONE_DIRECTION          0
 
 /* First define the conversion function from CP932 to UCS4.  */
 #define MIN_NEEDED_INPUT       MIN_NEEDED_FROM
@@ -4574,7 +4575,7 @@ static const char from_ucs4_extra[229][2] =
        uint32_t ch2;                                                         \
        uint_fast32_t idx;                                                    \
                                                                              \
-       if (__builtin_expect (inptr + 1 >= inend, 0))                         \
+       if (__glibc_unlikely (inptr + 1 >= inend))                            \
          {                                                                   \
            /* The second character is not available.  Store                  \
               the intermediate result.  */                                   \
@@ -4704,7 +4705,7 @@ static const char from_ucs4_extra[229][2] =
        /* Now test for a possible second byte and write this if possible.  */\
        if (cp[1] != '\0')                                                    \
          {                                                                   \
-           if (__builtin_expect (outptr + 1 >= outend, 0))                   \
+           if (__glibc_unlikely (outptr + 1 >= outend))                      \
              {                                                               \
                /* The result does not fit into the buffer.  */               \
                result = __GCONV_FULL_OUTPUT;                                 \