mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 22:10:13 +00:00
Update.
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>.
This commit is contained in:
parent
03fbfeb508
commit
61402fd689
22
ChangeLog
22
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>
|
2001-01-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* resolv/resolv.h (struct __res_state): Add nsinit field.
|
* resolv/resolv.h (struct __res_state): Add nsinit field.
|
||||||
|
@ -35,7 +35,7 @@ void free ();
|
|||||||
#else
|
#else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# ifndef memcpy
|
# ifndef memcpy
|
||||||
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
|
# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,8 +21,6 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
@ -41,7 +39,7 @@ void free ();
|
|||||||
#else
|
#else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# ifndef memcpy
|
# ifndef memcpy
|
||||||
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
|
# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#else
|
#else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# ifndef memcpy
|
# ifndef memcpy
|
||||||
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
|
# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
#if !HAVE_STRCHR && !defined _LIBC
|
||||||
|
@ -85,8 +85,11 @@
|
|||||||
cached by one of GCC's features. */
|
cached by one of GCC's features. */
|
||||||
int _nl_msg_cat_cntr;
|
int _nl_msg_cat_cntr;
|
||||||
|
|
||||||
|
#if defined __GNUC__ \
|
||||||
|
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
|
||||||
|
|
||||||
/* These structs are the constant expression for the germanic plural
|
/* 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 =
|
static const struct expression plvar =
|
||||||
{
|
{
|
||||||
.operation = var,
|
.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
|
/* Load the message catalogs specified by FILENAME. If it is no valid
|
||||||
message catalog do nothing. */
|
message catalog do nothing. */
|
||||||
@ -370,6 +404,7 @@ _nl_load_domain (domain_file)
|
|||||||
for `one', the plural form otherwise. Yes, this is also what
|
for `one', the plural form otherwise. Yes, this is also what
|
||||||
English is using since English is a Germanic language. */
|
English is using since English is a Germanic language. */
|
||||||
no_plural:
|
no_plural:
|
||||||
|
INIT_GERMANIC_PLURAL ();
|
||||||
domain->plural = &germanic_plural;
|
domain->plural = &germanic_plural;
|
||||||
domain->nplurals = 2;
|
domain->nplurals = 2;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ void free ();
|
|||||||
#else
|
#else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# ifndef memcpy
|
# ifndef memcpy
|
||||||
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
|
# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
#if !HAVE_STRCHR && !defined _LIBC
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
@ -228,7 +232,8 @@ yylex (YYSTYPE *lval, const char **pexp)
|
|||||||
result = *exp++;
|
result = *exp++;
|
||||||
switch (result)
|
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';
|
unsigned long int n = exp[-1] - '0';
|
||||||
while (exp[0] >= '0' && exp[0] <= '9')
|
while (exp[0] >= '0' && exp[0] <= '9')
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#else
|
#else
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
# ifndef memcpy
|
# ifndef memcpy
|
||||||
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
|
# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user