I recently merged gettext 0.19.3 into glibc. These are the changes to flow back as part of that merge. A large number of these are updates to the copyright lines with now use ranges rather than specifying individual years. The remaining changes are mostly confined to _LIBC conditionals.
ChangeLog: 2014-12-11 Will Newton <[email protected]> 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. --- gettext-runtime/intl/bindtextdom.c | 3 +-- gettext-runtime/intl/dcgettext.c | 4 ++-- gettext-runtime/intl/dcigettext.c | 6 +++--- gettext-runtime/intl/dcngettext.c | 2 +- gettext-runtime/intl/dgettext.c | 4 ++-- gettext-runtime/intl/dngettext.c | 2 +- gettext-runtime/intl/explodename.c | 2 +- gettext-runtime/intl/finddomain.c | 4 ++-- gettext-runtime/intl/gettext.c | 4 ++-- gettext-runtime/intl/gettextP.h | 3 ++- gettext-runtime/intl/gmo.h | 2 +- gettext-runtime/intl/hash-string.c | 2 +- gettext-runtime/intl/hash-string.h | 2 +- gettext-runtime/intl/l10nflist.c | 14 +++++--------- gettext-runtime/intl/loadinfo.h | 2 +- gettext-runtime/intl/loadmsgcat.c | 2 +- gettext-runtime/intl/localealias.c | 16 ++++++++-------- gettext-runtime/intl/ngettext.c | 2 +- gettext-runtime/intl/plural-exp.c | 9 +++++---- gettext-runtime/intl/plural-exp.h | 4 ++-- gettext-runtime/intl/plural.y | 2 +- gettext-runtime/intl/textdomain.c | 2 +- 22 files changed, 45 insertions(+), 48 deletions(-) diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index 2e7ada4..29a1b12 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -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-2014 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 diff --git a/gettext-runtime/intl/dcgettext.c b/gettext-runtime/intl/dcgettext.c index 071cf57..95dccad 100644 --- a/gettext-runtime/intl/dcgettext.c +++ b/gettext-runtime/intl/dcgettext.c @@ -1,5 +1,5 @@ /* Implementation of the dcgettext(3) function. - Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index c55d7a4..7af4a76 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -1,5 +1,5 @@ /* Implementation of the internal dcigettext function. - Copyright (C) 1995-1999, 2000-2010, 2012 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/dcngettext.c b/gettext-runtime/intl/dcngettext.c index 390ce7f..67dcbcf 100644 --- a/gettext-runtime/intl/dcngettext.c +++ b/gettext-runtime/intl/dcngettext.c @@ -1,5 +1,5 @@ /* Implementation of the dcngettext(3) function. - Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/dgettext.c b/gettext-runtime/intl/dgettext.c index 60c6c35..c0e6cd0 100644 --- a/gettext-runtime/intl/dgettext.c +++ b/gettext-runtime/intl/dgettext.c @@ -1,5 +1,5 @@ /* Implementation of the dgettext(3) function. - Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/dngettext.c b/gettext-runtime/intl/dngettext.c index ac3e922..4d900e7 100644 --- a/gettext-runtime/intl/dngettext.c +++ b/gettext-runtime/intl/dngettext.c @@ -1,5 +1,5 @@ /* Implementation of the dngettext(3) function. - Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/explodename.c b/gettext-runtime/intl/explodename.c index 3c14886..9e049c7 100644 --- a/gettext-runtime/intl/explodename.c +++ b/gettext-runtime/intl/explodename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc. +/* Copyright (C) 1995-2014 Free Software Foundation, Inc. Contributed by Ulrich Drepper <[email protected]>, 1995. This program is free software: you can redistribute it and/or modify diff --git a/gettext-runtime/intl/finddomain.c b/gettext-runtime/intl/finddomain.c index f272f37..b5a48a5 100644 --- a/gettext-runtime/intl/finddomain.c +++ b/gettext-runtime/intl/finddomain.c @@ -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-2014 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 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; diff --git a/gettext-runtime/intl/gettext.c b/gettext-runtime/intl/gettext.c index 09834fb..4a1af7e 100644 --- a/gettext-runtime/intl/gettext.c +++ b/gettext-runtime/intl/gettext.c @@ -1,5 +1,5 @@ /* Implementation of gettext(3) function. - Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index 3373ccc..6f4c684 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -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-2014 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 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, diff --git a/gettext-runtime/intl/gmo.h b/gettext-runtime/intl/gmo.h index a1703f4..4d18e9a 100644 --- a/gettext-runtime/intl/gmo.h +++ b/gettext-runtime/intl/gmo.h @@ -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-2014 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 diff --git a/gettext-runtime/intl/hash-string.c b/gettext-runtime/intl/hash-string.c index 00353f0..f44ebc0 100644 --- a/gettext-runtime/intl/hash-string.c +++ b/gettext-runtime/intl/hash-string.c @@ -1,5 +1,5 @@ /* Implements a string hashing function. - Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/hash-string.h b/gettext-runtime/intl/hash-string.h index dc4997b..339a4f8 100644 --- a/gettext-runtime/intl/hash-string.h +++ b/gettext-runtime/intl/hash-string.h @@ -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-2014 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 diff --git a/gettext-runtime/intl/l10nflist.c b/gettext-runtime/intl/l10nflist.c index 134cf59..2d835d0 100644 --- a/gettext-runtime/intl/l10nflist.c +++ b/gettext-runtime/intl/l10nflist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. +/* Copyright (C) 1995-2014 Free Software Foundation, Inc. Contributed by Ulrich Drepper <[email protected]>, 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 * diff --git a/gettext-runtime/intl/loadinfo.h b/gettext-runtime/intl/loadinfo.h index eb8ae6f..adf5bc9 100644 --- a/gettext-runtime/intl/loadinfo.h +++ b/gettext-runtime/intl/loadinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc. +/* Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <[email protected]>, 1996. diff --git a/gettext-runtime/intl/loadmsgcat.c b/gettext-runtime/intl/loadmsgcat.c index 570f476..4074c4c 100644 --- a/gettext-runtime/intl/loadmsgcat.c +++ b/gettext-runtime/intl/loadmsgcat.c @@ -1,5 +1,5 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000-2008, 2010 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/localealias.c b/gettext-runtime/intl/localealias.c index b6fff1e..ff13dde 100644 --- a/gettext-runtime/intl/localealias.c +++ b/gettext-runtime/intl/localealias.c @@ -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-2014 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,11 @@ 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 # 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 # undef feof # define feof(s) feof_unlocked (s) #endif @@ -232,7 +232,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 +388,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; diff --git a/gettext-runtime/intl/ngettext.c b/gettext-runtime/intl/ngettext.c index 0123064..7fe7e7f 100644 --- a/gettext-runtime/intl/ngettext.c +++ b/gettext-runtime/intl/ngettext.c @@ -1,5 +1,5 @@ /* Implementation of ngettext(3) function. - Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc. + Copyright (C) 1995-2014 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 diff --git a/gettext-runtime/intl/plural-exp.c b/gettext-runtime/intl/plural-exp.c index 6dc0efe..97cd93a 100644 --- a/gettext-runtime/intl/plural-exp.c +++ b/gettext-runtime/intl/plural-exp.c @@ -1,5 +1,5 @@ /* Expression parsing for plural form selection. - Copyright (C) 2000-2001, 2003, 2005-2007 Free Software Foundation, Inc. + Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 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) { diff --git a/gettext-runtime/intl/plural-exp.h b/gettext-runtime/intl/plural-exp.h index 251d57c..beaa326 100644 --- a/gettext-runtime/intl/plural-exp.h +++ b/gettext-runtime/intl/plural-exp.h @@ -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-2014 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 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) diff --git a/gettext-runtime/intl/plural.y b/gettext-runtime/intl/plural.y index c19634e..d74de07 100644 --- a/gettext-runtime/intl/plural.y +++ b/gettext-runtime/intl/plural.y @@ -1,6 +1,6 @@ %{ /* Expression parsing for plural form selection. - Copyright (C) 2000-2001, 2003, 2005-2006 Free Software Foundation, Inc. + Copyright (C) 2000-2014 Free Software Foundation, Inc. Written by Ulrich Drepper <[email protected]>, 2000. This program is free software: you can redistribute it and/or modify diff --git a/gettext-runtime/intl/textdomain.c b/gettext-runtime/intl/textdomain.c index 8415be6..d1ab52a 100644 --- a/gettext-runtime/intl/textdomain.c +++ b/gettext-runtime/intl/textdomain.c @@ -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-2014 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.9.3
