intl: Merge from glibc

* bindtextdom.c: Update copyright to use year ranges.
* dcgettext.c: Update copyright to use year ranges.
[_LIBC]: Use libc_hidden_def instead of INTDEF.
* dcigettext.c: Update copyright to use year ranges.
Test HAVE_TSEARCH with #ifdef rather than #if.
(DCIGETTEXT) [_LIBC]: Use __current_locale_name instead of
_current_locale_name.
* dcngettext.c: Update copyright to use year ranges.
* dgettext.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
* dngettext.c: Update copyright to use year ranges.
* explodename.c: Likewise.
* finddomain.c: Update copyright to use year ranges.
(_nl_finddomain_subfreeres): Use void in no-arguments function
definition.
* gettext.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
* gettextP.h: Update copyright to use year ranges.
[_LIBC]: Forward declaration of struct loaded_domain.
* gmo.h: Update copyright to use year ranges.
* hash-string.c: Likewise.
* hash-string.h: Likewise.
* l10nflist.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
Wrap pop function in [!ARCH_POP].
* loadinfo.h: Update copyright to use year ranges.
* loadmsgcat.c: Likewise.
* localealias.c: Update copyright to use year ranges.
Test ENABLE_RELOCATABLE with #ifdef rather than #if.
[_LIBC]: Use __strcasecmp_l for strcasecmp.
[_LIBC]: Use __fgets_unlocked for FGETS.
Test HAVE_DECL_FGETS_UNLOCKED with #ifdef rather than #if.
Test HAVE_DECL_FEOF_UNLOCKED with #ifdef rather than #if.
(read_alias_file) [_LIBC]: Open file with O_CLOEXEC.
(extend_alias_table): Use void in no-arguments function
definition.
* ngettext.c: Update copyright to use year ranges.
* plural-exp.c: Update copyright to use year ranges.
Test __APPLE_CC__ with #ifdef rather than #if.
(GERMANIC_PLURAL): Make const.
(init_germanic_plural): Use void in no-arguments function
definition.
* plural-exp.h: Update copyright to use year ranges.
(GERMANIC_PLURAL): Make const.
* plural.y: Update copyright to use year ranges.
* textdomain.c: Likewise.
This commit is contained in:
Will Newton
2015-01-21 11:55:02 +09:00
committed by Daiki Ueno
parent ee2e97ad07
commit d5c2a5163b
27 changed files with 101 additions and 52 deletions
+50
View File
@@ -1,3 +1,53 @@
2015-01-21 Will Newton <will.newton@linaro.org>
intl: Merge from glibc
* bindtextdom.c: Update copyright to use year ranges.
* dcgettext.c: Update copyright to use year ranges.
[_LIBC]: Use libc_hidden_def instead of INTDEF.
* dcigettext.c: Update copyright to use year ranges.
Test HAVE_TSEARCH with #ifdef rather than #if.
(DCIGETTEXT) [_LIBC]: Use __current_locale_name instead of
_current_locale_name.
* dcngettext.c: Update copyright to use year ranges.
* dgettext.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
* dngettext.c: Update copyright to use year ranges.
* explodename.c: Likewise.
* finddomain.c: Update copyright to use year ranges.
(_nl_finddomain_subfreeres): Use void in no-arguments function
definition.
* gettext.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
* gettextP.h: Update copyright to use year ranges.
[_LIBC]: Forward declaration of struct loaded_domain.
* gmo.h: Update copyright to use year ranges.
* hash-string.c: Likewise.
* hash-string.h: Likewise.
* l10nflist.c: Update copyright to use year ranges.
[_LIBC]: Remove use of INTUSE macro.
Wrap pop function in [!ARCH_POP].
* loadinfo.h: Update copyright to use year ranges.
* loadmsgcat.c: Likewise.
* localealias.c: Update copyright to use year ranges.
Test ENABLE_RELOCATABLE with #ifdef rather than #if.
[_LIBC]: Use __strcasecmp_l for strcasecmp.
[_LIBC]: Use __fgets_unlocked for FGETS.
Test HAVE_DECL_FGETS_UNLOCKED with #ifdef rather than #if.
Test HAVE_DECL_FEOF_UNLOCKED with #ifdef rather than #if.
(read_alias_file) [_LIBC]: Open file with O_CLOEXEC.
(extend_alias_table): Use void in no-arguments function
definition.
* ngettext.c: Update copyright to use year ranges.
* plural-exp.c: Update copyright to use year ranges.
Test __APPLE_CC__ with #ifdef rather than #if.
(GERMANIC_PLURAL): Make const.
(init_germanic_plural): Use void in no-arguments function
definition.
* plural-exp.h: Update copyright to use year ranges.
(GERMANIC_PLURAL): Make const.
* plural.y: Update copyright to use year ranges.
* textdomain.c: Likewise.
2015-01-04 Václav Slavík <vaclav@slavik.io> (tiny change)
intl: Add missing libintl.h dependency from pluralx.$lo
+1 -2
View File
@@ -1,6 +1,5 @@
/* Implementation of the bindtextdomain(3) function
Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008 Free Software
Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+2 -2
View File
@@ -1,5 +1,5 @@
/* Implementation of the dcgettext(3) function.
Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -49,6 +49,6 @@ DCGETTEXT (const char *domainname, const char *msgid, int category)
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
INTDEF(__dcgettext)
weak_alias (__dcgettext, dcgettext);
libc_hidden_def (__dcgettext)
#endif
+3 -3
View File
@@ -1,5 +1,5 @@
/* Implementation of the internal dcigettext function.
Copyright (C) 1995-1999, 2000-2010, 2012 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -157,7 +157,7 @@ static void *mempcpy (void *dest, const void *src, size_t n);
/* Use a replacement if the system does not provide the `tsearch' function
family. */
#if HAVE_TSEARCH || defined _LIBC
#if defined HAVE_TSEARCH || defined _LIBC
# include <search.h>
#else
# define tsearch libintl_tsearch
@@ -550,7 +550,7 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
#ifdef HAVE_PER_THREAD_LOCALE
# ifndef IN_LIBGLOCALE
# ifdef _LIBC
localename = _strdupa (_current_locale_name (category));
localename = strdupa (__current_locale_name (category));
# else
categoryname = category_to_name (category);
# define CATEGORYNAME_INITIALIZED
+1 -1
View File
@@ -1,5 +1,5 @@
/* Implementation of the dcngettext(3) function.
Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+2 -2
View File
@@ -1,5 +1,5 @@
/* Implementation of the dgettext(3) function.
Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -36,7 +36,7 @@
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DGETTEXT __dgettext
# define DCGETTEXT INTUSE(__dcgettext)
# define DCGETTEXT __dcgettext
#else
# define DGETTEXT libintl_dgettext
# define DCGETTEXT libintl_dcgettext
+1 -1
View File
@@ -1,5 +1,5 @@
/* Implementation of the dngettext(3) function.
Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc.
/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software: you can redistribute it and/or modify
+2 -2
View File
@@ -1,5 +1,5 @@
/* Handle list of needed message catalogs
Copyright (C) 1995-1999, 2000-2001, 2003-2007 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software: you can redistribute it and/or modify
@@ -193,7 +193,7 @@ out:
/* This is called from iconv/gconv_db.c's free_mem, as locales must
be freed before freeing gconv steps arrays. */
void __libc_freeres_fn_section
_nl_finddomain_subfreeres ()
_nl_finddomain_subfreeres (void)
{
struct loaded_l10nfile *runp = _nl_loaded_domains;
+2 -2
View File
@@ -1,5 +1,5 @@
/* Implementation of gettext(3) function.
Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -40,7 +40,7 @@
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define GETTEXT __gettext
# define DCGETTEXT INTUSE(__dcgettext)
# define DCGETTEXT __dcgettext
#else
# define GETTEXT libintl_gettext
# define DCGETTEXT libintl_dcgettext
+2 -1
View File
@@ -1,5 +1,5 @@
/* Header describing internals of libintl library.
Copyright (C) 1995-1999, 2000-2007, 2009-2010 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
This program is free software: you can redistribute it and/or modify
@@ -37,6 +37,7 @@
#endif
#ifdef _LIBC
struct loaded_domain;
extern char *__gettext (const char *__msgid);
extern char *__dgettext (const char *__domainname, const char *__msgid);
extern char *__dcgettext (const char *__domainname, const char *__msgid,
+1 -1
View File
@@ -1,5 +1,5 @@
/* Description of GNU message catalog format: general file layout.
Copyright (C) 1995, 1997, 2000-2002, 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,5 +1,5 @@
/* Implements a string hashing function.
Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
+1 -1
View File
@@ -1,5 +1,5 @@
/* Description of GNU message catalog format: string hashing function.
Copyright (C) 1995, 1997-1998, 2000-2003, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+5 -9
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software: you can redistribute it and/or modify
@@ -80,9 +80,7 @@ static char *stpcpy (char *dest, const char *src);
/* Define function which are usually not available. */
#ifdef _LIBC
# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
#elif defined HAVE_ARGZ_COUNT
#if defined HAVE_ARGZ_COUNT
# undef __argz_count
# define __argz_count argz_count
#else
@@ -104,10 +102,7 @@ argz_count__ (const char *argz, size_t len)
# define __argz_count(argz, len) argz_count__ (argz, len)
#endif /* !_LIBC && !HAVE_ARGZ_COUNT */
#ifdef _LIBC
# define __argz_stringify(argz, len, sep) \
INTUSE(__argz_stringify) (argz, len, sep)
#elif defined HAVE_ARGZ_STRINGIFY
#if defined HAVE_ARGZ_STRINGIFY
# undef __argz_stringify
# define __argz_stringify argz_stringify
#else
@@ -154,8 +149,8 @@ argz_next__ (char *argz, size_t argz_len, const char *entry)
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
#endif /* !_LIBC && !HAVE_ARGZ_NEXT */
/* Return number of bits set in X. */
#ifndef ARCH_POP
static inline int
pop (int x)
{
@@ -167,6 +162,7 @@ pop (int x)
return x;
}
#endif
struct loaded_l10nfile *
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc.
/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+1 -1
View File
@@ -1,5 +1,5 @@
/* Load needed message catalogs.
Copyright (C) 1995-1999, 2000-2008, 2010 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2014 Free Software Foundation, Inc.
Copyright (C) 2000-2006, 2008-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+10 -8
View File
@@ -1,5 +1,5 @@
/* Handle aliases for locale names.
Copyright (C) 1995-1999, 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -60,7 +60,7 @@ char *alloca ();
#include "gettextP.h"
#if ENABLE_RELOCATABLE
#ifdef ENABLE_RELOCATABLE
# include "relocatable.h"
#else
# define relocate(pathname) (pathname)
@@ -72,7 +72,7 @@ char *alloca ();
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define strcasecmp __strcasecmp
# define strcasecmp(s1, s2) __strcasecmp_l (s1, s2, _nl_C_locobj_ptr)
# ifndef mempcpy
# define mempcpy __mempcpy
@@ -95,7 +95,7 @@ char *alloca ();
/* Some optimizations for glibc. */
#ifdef _LIBC
# define FEOF(fp) feof_unlocked (fp)
# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
# define FGETS(buf, n, fp) __fgets_unlocked (buf, n, fp)
#else
# define FEOF(fp) feof (fp)
# define FGETS(buf, n, fp) fgets (buf, n, fp)
@@ -110,11 +110,13 @@ char *alloca ();
# define freea(p) free (p)
#endif
#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
#if defined _LIBC_REENTRANT \
|| (defined HAVE_DECL_FGETS_UNLOCKED && HAVE_DECL_FGETS_UNLOCKED)
# undef fgets
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
#endif
#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
#if defined _LIBC_REENTRANT \
|| (defined HAVE_DECL_FEOF_UNLOCKED && HAVE_DECL_FEOF_UNLOCKED)
# undef feof
# define feof(s) feof_unlocked (s)
#endif
@@ -232,7 +234,7 @@ read_alias_file (const char *fname, int fname_len)
#ifdef _LIBC
/* Note the file is opened with cancellation in the I/O functions
disabled. */
fp = fopen (relocate (full_fname), "rc");
fp = fopen (relocate (full_fname), "rce");
#else
fp = fopen (relocate (full_fname), "r");
#endif
@@ -388,7 +390,7 @@ read_alias_file (const char *fname, int fname_len)
static int
extend_alias_table ()
extend_alias_table (void)
{
size_t new_size;
struct alias_map *new_map;
+1 -1
View File
@@ -1,5 +1,5 @@
/* Determine name of the currently selected locale.
Copyright (C) 1995-2014 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,5 +1,5 @@
/* Implementation of ngettext(3) function.
Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+5 -4
View File
@@ -1,5 +1,5 @@
/* Expression parsing for plural form selection.
Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,8 @@
#include "plural-exp.h"
#if (defined __GNUC__ && !(__APPLE_CC__ > 1) && !defined __cplusplus) \
#if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) \
&& !defined __cplusplus) \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
/* These structs are the constant expression for the germanic plural
@@ -44,7 +45,7 @@ static const struct expression plone =
.num = 1
}
};
struct expression GERMANIC_PLURAL =
const struct expression GERMANIC_PLURAL =
{
.nargs = 2,
.operation = not_equal,
@@ -70,7 +71,7 @@ static struct expression plone;
struct expression GERMANIC_PLURAL;
static void
init_germanic_plural ()
init_germanic_plural (void)
{
if (plone.val.num == 0)
{
+2 -2
View File
@@ -1,5 +1,5 @@
/* Expression parsing and evaluation for plural form selection.
Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software: you can redistribute it and/or modify
@@ -108,7 +108,7 @@ struct parse_args
extern void FREE_EXPRESSION (struct expression *exp)
internal_function;
extern int PLURAL_PARSE (struct parse_args *arg);
extern struct expression GERMANIC_PLURAL attribute_hidden;
extern const struct expression GERMANIC_PLURAL attribute_hidden;
extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
const struct expression **pluralp,
unsigned long int *npluralsp)
+1 -1
View File
@@ -1,6 +1,6 @@
%{
/* Expression parsing for plural form selection.
Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc.
Copyright (C) 2000-2015 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* Implementation of the textdomain(3) function.
Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc.
Copyright (C) 1995-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
+1 -1
View File
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
Copyright (C) 2003, 2008-2014 Free Software Foundation, Inc.
Copyright (C) 2003, 2008-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by