]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Tweaks for use of gcc-4.0 on MacOS X.
authorBruno Haible <bruno@clisp.org>
Mon, 18 Apr 2005 09:40:01 +0000 (09:40 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:31 +0000 (12:12 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/libgnuintl.h.in
gettext-runtime/intl/plural-exp.c
gettext-tools/libgrep/ChangeLog
gettext-tools/libgrep/dfa.c
gettext-tools/src/ChangeLog
gettext-tools/src/po-lex.c
gettext-tools/src/po-lex.h
gettext-tools/src/read-stringtable.c

index f511cb8b592f084aaff3eabdeec7403c9e12f213..ea7b44b22d2fe831f6922b8d5c4c7fb9c0563807 100644 (file)
@@ -1,3 +1,11 @@
+2005-04-18  Bruno Haible  <bruno@clisp.org>
+
+       * libgnuintl.h.in (_INTL_REDIRECT_ASM): Test for __APPLE_CC__ > 1.
+       Needed because gcc-4.0 defines __APPLE_CC__ and implements
+       __USER_LABEL_PREFIX__ correctly.
+       * plural-exp.c (GERMANIC_PLURAL): Test for __APPLE_CC > 1.
+       Needed because gcc-4.0 defines __APPLE_CC__.
+
 2005-04-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.4 released.
index afc21dad42d104391e7280902e5c11c849939681..24ecbb37349429e88f6284432598a668a6b67333 100644 (file)
@@ -83,7 +83,7 @@ extern "C" {
    If he doesn't, we choose the method.  A third possible method is
    _INTL_REDIRECT_ASM, supported only by GCC.  */
 #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
-# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
+# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
 #  define _INTL_REDIRECT_ASM
 # else
 #  ifdef __cplusplus
index 8c04e642659dd726fd5bf0dcd65ee61eac2f11fa..bff626f2ffb5a61c5a9092babeda92ed016b5cee 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "plural-exp.h"
 
-#if (defined __GNUC__ && !defined __APPLE_CC__) \
+#if (defined __GNUC__ && !(__APPLE_CC__ > 1)) \
     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
 
 /* These structs are the constant expression for the germanic plural
index 991fc1b898b71f10bf5dbaa309ad97ffefce8fdd..924fab2d4217607883d961ae05425fe321fedce4 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-18  Bruno Haible  <bruno@clisp.org>
+
+       * dfa.c (update_mb_len_index): Change argument type to 'const char *'.
+       Avoids gcc-4.0 warnings.
+
 2005-04-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.4 released.
index 536f0aaface4b850b65248533b6010cac1b0e8e8..e08e799e32f0dfb453a9e8c7f3032ca13fde7eba 100644 (file)
@@ -343,7 +343,7 @@ static unsigned char const *buf_end;        /* refference to end in dfaexec().  */
 /* This function update cur_mb_len, and cur_mb_index.
    p points current lexptr, len is the remaining buffer length.  */
 static void
-update_mb_len_index (unsigned char const *p, int len)
+update_mb_len_index (char const *p, int len)
 {
   /* If last character is a part of a multibyte character,
      we update cur_mb_index.  */
index 1710b89fd629d69b3ea875fb079ecdf4b6d530b1..9a75d92dac7f19c3f45f9ae81f1b5e37598e36fb 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-18  Bruno Haible  <bruno@clisp.org>
+
+       * po-lex.h (po_gram_error, po_gram_error_at_line): Test for
+       __APPLE_CC__ > 1. Needed because gcc-4.0 defines __APPLE_CC__ and
+       implements __VA_ARGS__ correctly.
+       * po-lex.c (po_gram_error, po_gram_error_at_line): Likewise.
+       * read-stringtable.c (phase2_getc): Optimize UTF-8 code. Avoids
+       gcc-4.0 warnings.
+
 2005-04-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.14.4 released.
index 1da40f9085f3ccc0dbd489a0ff4163f88692a776..9dadf716f2c8b2f08d9908f688802f26dd3b85b5 100644 (file)
@@ -72,7 +72,7 @@ int gram_pos_column;
 
 #if !(__STDC__ && \
       ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __DECC) \
-       || (defined __GNUC__ && __GNUC__ >= 2 && !defined __APPLE_CC__)))
+       || (defined __GNUC__ && __GNUC__ >= 2 && !(__APPLE_CC__ > 1))))
 
 /* CAUTION: If you change this function, you must also make identical
    changes to the macro of the same name in src/po-lex.h  */
index 10533e0aba9fb2c6d57b9911809c83115f1252e0..81db87b76cc757697d3a42148b83c687f61de99c 100644 (file)
@@ -109,7 +109,7 @@ extern void po_lex_pass_obsolete_entries (bool flag);
   } while (0)
 
 /* GCC is also smart enough to allow optimizations like this.  */
-#elif __STDC__ && defined __GNUC__ && __GNUC__ >= 2 && !defined __APPLE_CC__
+#elif __STDC__ && defined __GNUC__ && __GNUC__ >= 2 && !(__APPLE_CC__ > 1)
 
 /* CAUTION: If you change this macro, you must also make identical
    changes to the function of the same name in src/po-lex.c  */
index b96d036b75e576965dd348ef28bbab58b76af355..316dc3909b940586fd06b54c7dc18ce57af1e2b1 100644 (file)
@@ -229,52 +229,46 @@ phase2_getc ()
              return UEOF;
            buf[1] = c;
            count = 2;
-         }
-
-       if (buf[0] >= 0xe0
-           && ((buf[1] ^ 0x80) < 0x40))
-         {
-           c = phase1_getc ();
-           if (c == EOF)
-             return UEOF;
-           buf[2] = c;
-           count = 3;
-         }
 
-       if (buf[0] >= 0xf0
-           && ((buf[1] ^ 0x80) < 0x40)
-           && ((buf[2] ^ 0x80) < 0x40))
-         {
-           c = phase1_getc ();
-           if (c == EOF)
-             return UEOF;
-           buf[3] = c;
-           count = 4;
-         }
-
-       if (buf[0] >= 0xf8
-           && ((buf[1] ^ 0x80) < 0x40)
-           && ((buf[2] ^ 0x80) < 0x40)
-           && ((buf[3] ^ 0x80) < 0x40))
-         {
-           c = phase1_getc ();
-           if (c == EOF)
-             return UEOF;
-           buf[4] = c;
-           count = 5;
-         }
-
-       if (buf[0] >= 0xfc
-           && ((buf[1] ^ 0x80) < 0x40)
-           && ((buf[2] ^ 0x80) < 0x40)
-           && ((buf[3] ^ 0x80) < 0x40)
-           && ((buf[4] ^ 0x80) < 0x40))
-         {
-           c = phase1_getc ();
-           if (c == EOF)
-             return UEOF;
-           buf[5] = c;
-           count = 6;
+           if (buf[0] >= 0xe0
+               && ((buf[1] ^ 0x80) < 0x40))
+             {
+               c = phase1_getc ();
+               if (c == EOF)
+                 return UEOF;
+               buf[2] = c;
+               count = 3;
+
+               if (buf[0] >= 0xf0
+                   && ((buf[2] ^ 0x80) < 0x40))
+                 {
+                   c = phase1_getc ();
+                   if (c == EOF)
+                     return UEOF;
+                   buf[3] = c;
+                   count = 4;
+
+                   if (buf[0] >= 0xf8
+                       && ((buf[3] ^ 0x80) < 0x40))
+                     {
+                       c = phase1_getc ();
+                       if (c == EOF)
+                         return UEOF;
+                       buf[4] = c;
+                       count = 5;
+
+                       if (buf[0] >= 0xfc
+                           && ((buf[4] ^ 0x80) < 0x40))
+                         {
+                           c = phase1_getc ();
+                           if (c == EOF)
+                             return UEOF;
+                           buf[5] = c;
+                           count = 6;
+                         }
+                     }
+                 }
+             }
          }
 
        u8_mbtouc (&uc, buf, count);