]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 5 Jan 2001 05:52:11 +0000 (05:52 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 5 Jan 2001 05:52:11 +0000 (05:52 +0000)
2000-07-31  Bruno Haible  <haible@clisp.cons.org>

* intl/plural.y: Include config.h. Needed to define 'inline' away for
C compilers that don't support it.
(yylex): Don't use gcc specific case range syntax.
* intl/loadmsgcat.c (INIT_GERMANIC_PLURAL): New macro, for old
compilers.

2000-10-12  Bruno Haible  <haible@clisp.cons.org>

* intl/finddomain.c: Remove unneeded includes.

2000-10-12  Bruno Haible  <haible@clisp.cons.org>

* intl/localealias.c (memcpy): Return first argument, just like the
real memcpy function does.
* intl/bindtextdom.c (memcpy): Likewise.
* intl/finddomain.c (memcpy): Likewise.
* intl/l10nflist.c (memcpy): Likewise.
* intl/textdomain.c (memcpy): Likewise.
From Paul Eggert <eggert@twinsun.com>.

ChangeLog
intl/bindtextdom.c
intl/finddomain.c
intl/l10nflist.c
intl/loadmsgcat.c
intl/localealias.c
intl/plural.y
intl/textdomain.c

index 10ca84cc9a16170a4638c0bbd4f7e9c681041fda..7e6f2c72a4b2f119846af18cd20a948284de6f63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2000-07-31  Bruno Haible  <haible@clisp.cons.org>
+
+       * intl/plural.y: Include config.h. Needed to define 'inline' away for
+       C compilers that don't support it.
+       (yylex): Don't use gcc specific case range syntax.
+       * intl/loadmsgcat.c (INIT_GERMANIC_PLURAL): New macro, for old
+       compilers.
+
+2000-10-12  Bruno Haible  <haible@clisp.cons.org>
+
+       * intl/finddomain.c: Remove unneeded includes.
+
+2000-10-12  Bruno Haible  <haible@clisp.cons.org>
+
+       * intl/localealias.c (memcpy): Return first argument, just like the
+       real memcpy function does.
+       * intl/bindtextdom.c (memcpy): Likewise.
+       * intl/finddomain.c (memcpy): Likewise.
+       * intl/l10nflist.c (memcpy): Likewise.
+       * intl/textdomain.c (memcpy): Likewise.
+       From Paul Eggert <eggert@twinsun.com>.
+
 2001-01-03  Jakub Jelinek  <jakub@redhat.com>
 
        * resolv/resolv.h (struct __res_state): Add nsinit field.
index 7de81c6cb56fc1e33113cfbfaf25f298f31026b6..45000a6b58ac2d82747e0b7f300272e5fa999ac0 100644 (file)
@@ -35,7 +35,7 @@ void free ();
 #else
 # include <strings.h>
 # ifndef memcpy
-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+#  define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
 # endif
 #endif
 
index dc215ad126ad2012f6ea19c4271c35139f795992..1109c5ebc0ef41c7694470f32af587e341c5871c 100644 (file)
@@ -21,8 +21,6 @@
 # include <config.h>
 #endif
 
-#include <ctype.h>
-#include <errno.h>
 #include <stdio.h>
 #include <sys/types.h>
 
@@ -41,7 +39,7 @@ void free ();
 #else
 # include <strings.h>
 # ifndef memcpy
-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+#  define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
 # endif
 #endif
 
index 4cd6615bac2673fec25b924f6dd8a9099af15abe..2017311ab3094f606bee89e0b0c60d482630a071 100644 (file)
@@ -33,7 +33,7 @@
 #else
 # include <strings.h>
 # ifndef memcpy
-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+#  define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
 # endif
 #endif
 #if !HAVE_STRCHR && !defined _LIBC
index 6b098154376e6ff57b92973365875e06c64d2f58..4e792d20cb07a4f9e5fe38bcaa2d81557edf91f7 100644 (file)
    cached by one of GCC's features.  */
 int _nl_msg_cat_cntr;
 
+#if defined __GNUC__ \
+    || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+
 /* These structs are the constant expression for the germanic plural
-   form determination.  */
+   form determination.  It represents the expression  "n != 1".  */
 static const struct expression plvar =
 {
   .operation = var,
@@ -111,6 +114,37 @@ static struct expression germanic_plural =
   }
 };
 
+#define INIT_GERMANIC_PLURAL()
+
+#else
+
+/* For compilers without support for ISO C 99 struct/union initializers:
+   Initialization at run-time.  */
+
+static struct expression plvar;
+static struct expression plone;
+static struct expression germanic_plural;
+
+static void
+init_germanic_plural ()
+{
+  if (plone.val.num == 0)
+    {
+      plvar.operation = var;
+
+      plone.operation = num;
+      plone.val.num = 1;
+
+      germanic_plural.operation = not_equal;
+      germanic_plural.val.args2.left = &plvar;
+      germanic_plural.val.args2.right = &plone;
+    }
+}
+
+#define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+
+#endif
+
 
 /* Load the message catalogs specified by FILENAME.  If it is no valid
    message catalog do nothing.  */
@@ -370,6 +404,7 @@ _nl_load_domain (domain_file)
          for `one', the plural form otherwise.  Yes, this is also what
          English is using since English is a Germanic language.  */
     no_plural:
+      INIT_GERMANIC_PLURAL ();
       domain->plural = &germanic_plural;
       domain->nplurals = 2;
     }
index 426db49b971f95ce411672ed747a7248a8eacb63..63e8069047e60d17329ef414e5c153714c6759cd 100644 (file)
@@ -64,7 +64,7 @@ void free ();
 #else
 # include <strings.h>
 # ifndef memcpy
-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+#  define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
 # endif
 #endif
 #if !HAVE_STRCHR && !defined _LIBC
index c13dbafab88dcf176b56569958759809e96e887f..32ad7515e53c2938bc98f7658c33b7fa743f4229 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdarg.h>
 #include <stdlib.h>
 #include "gettext.h"
@@ -228,7 +232,8 @@ yylex (YYSTYPE *lval, const char **pexp)
   result = *exp++;
   switch (result)
     {
-    case '0' ... '9':
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9':
       {
        unsigned long int n = exp[-1] - '0';
        while (exp[0] >= '0' && exp[0] <= '9')
index fe9f1718158103bd4e6c6c9a7afb6765c5cb4991..02f4a4bc0c798c47c339977a2d34ab4337b3fded 100644 (file)
@@ -29,7 +29,7 @@
 #else
 # include <strings.h>
 # ifndef memcpy
-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+#  define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
 # endif
 #endif
 
This page took 0.060166 seconds and 5 git commands to generate.