]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Merge from glibc.
authorBruno Haible <bruno@clisp.org>
Sat, 30 Sep 2023 18:21:52 +0000 (20:21 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 30 Sep 2023 22:36:55 +0000 (00:36 +0200)
Apply commit
2017-08-15  Florian Weimer  <fweimer@redhat.com>
iconv, intl, locale, wcsmbs: Remove internal_function

gettext-runtime/intl/dcigettext.c
gettext-runtime/intl/eval-plural.h
gettext-runtime/intl/finddomain.c
gettext-runtime/intl/gettextP.h
gettext-runtime/intl/loadinfo.h
gettext-runtime/intl/loadmsgcat.c
gettext-runtime/intl/localealias.c
gettext-runtime/intl/plural-exp.c
gettext-runtime/intl/plural-exp.h
gettext-runtime/intl/plural.y

index 242dd5192b97a04dea6af9b31e9e8738f47a55e2..a90b509bd925ef3eb4317d8589a25626f7493ba5 100644 (file)
@@ -316,18 +316,15 @@ struct binding *_nl_domain_bindings;
 /* Prototypes for local functions.  */
 static char *plural_lookup (struct loaded_l10nfile *domain,
                            unsigned long int n,
-                           const char *translation, size_t translation_len)
-     internal_function;
+                           const char *translation, size_t translation_len);
 
 #ifdef IN_LIBGLOCALE
 static const char *guess_category_value (int category,
                                         const char *categoryname,
-                                        const char *localename)
-     internal_function;
+                                        const char *localename);
 #else
 static const char *guess_category_value (int category,
-                                        const char *categoryname)
-     internal_function;
+                                        const char *categoryname);
 #endif
 
 #ifdef _LIBC
@@ -335,11 +332,10 @@ static const char *guess_category_value (int category,
 # define category_to_name(category) \
   _nl_category_names.str + _nl_category_name_idxs[category]
 #else
-static const char *category_to_name (int category) internal_function;
+static const char *category_to_name (int category);
 #endif
 #if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE
-static const char *get_output_charset (struct binding *domainbinding)
-     internal_function;
+static const char *get_output_charset (struct binding *domainbinding);
 #endif
 
 
@@ -932,7 +928,6 @@ __libc_lock_define_initialized (static, lock)
    in case of a memory allocation failure during conversion (only if
    ENCODING != NULL resp. CONVERT == true).  */
 char *
-internal_function
 #ifdef IN_LIBGLOCALE
 _nl_find_msg (struct loaded_l10nfile *domain_file,
              struct binding *domainbinding, const char *encoding,
@@ -1462,7 +1457,6 @@ _nl_find_msg (struct loaded_l10nfile *domain_file,
 
 /* Look up a plural variant.  */
 static char *
-internal_function
 plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
               const char *translation, size_t translation_len)
 {
@@ -1500,7 +1494,6 @@ plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
 #ifndef _LIBC
 /* Return string representation of locale CATEGORY.  */
 static const char *
-internal_function
 category_to_name (int category)
 {
   const char *retval;
@@ -1562,7 +1555,6 @@ category_to_name (int category)
    This uses values of the environment variables LC_ALL, LC_*, LANG, LANGUAGE,
    and/or system-dependent defaults.  */
 static const char *
-internal_function
 #ifdef IN_LIBGLOCALE
 guess_category_value (int category, const char *categoryname,
                      const char *locale)
@@ -1657,7 +1649,6 @@ guess_category_value (int category, const char *categoryname)
 #if (defined _LIBC || HAVE_ICONV) && !defined IN_LIBGLOCALE
 /* Returns the output charset.  */
 static const char *
-internal_function
 get_output_charset (struct binding *domainbinding)
 {
   /* The output charset should normally be determined by the locale.  But
index df35866c74db6ae10cb2f2f02d8926d748be7ca9..38413c4d4327a7ba8c717d1188a6e5ae23266554 100644 (file)
@@ -1,5 +1,5 @@
 /* Plural expression evaluation.
-   Copyright (C) 2000-2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000-2023 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
@@ -21,7 +21,6 @@
 /* Evaluate the plural expression and return an index value.  */
 STATIC
 unsigned long int
-internal_function
 plural_eval (const struct expression *pexp, unsigned long int n)
 {
   switch (pexp->nargs)
index 59e7463de8ad2b8f45a5ce813aa75c9c1c8e093b..2a40df011dbf649b2e00d61bddde255ba04b6254 100644 (file)
@@ -62,7 +62,6 @@ gl_rwlock_define_initialized (static, lock);
    the DIRNAME or WDIRNAME, LOCALE, and DOMAINNAME parameters with respect
    to the currently established bindings.  */
 struct loaded_l10nfile *
-internal_function
 _nl_find_domain (const char *dirname,
 #if defined _WIN32 && !defined __CYGWIN__
                 const wchar_t *wdirname,
index 58576ff4c5ffb4fb2784a8eecb5d91f0f55580b0..5c21505dbab4d379f80ef36d5fe817c30b68e6b7 100644 (file)
@@ -61,7 +61,7 @@ extern char *__bind_textdomain_codeset (const char *__domainname,
                                        const char *__codeset);
 extern void _nl_finddomain_subfreeres (void) attribute_hidden;
 extern void _nl_unload_domain (struct loaded_domain *__domain)
-     internal_function attribute_hidden;
+     attribute_hidden;
 #else
 /* Declare the exported libintl_* functions, in a way that allows us to
    call them under their real name.  */
@@ -89,10 +89,6 @@ extern char *libintl_dcigettext (const char *__domainname,
 
 /* @@ end of prolog @@ */
 
-#ifndef internal_function
-# define internal_function
-#endif
-
 #ifndef attribute_hidden
 # define attribute_hidden
 #endif
@@ -242,23 +238,19 @@ struct loaded_l10nfile *_nl_find_domain (const char *__dirname,
 #endif
                                         char *__locale,
                                         const char *__domainname,
-                                        struct binding *__domainbinding)
-     internal_function;
+                                        struct binding *__domainbinding);
 void _nl_load_domain (struct loaded_l10nfile *__domain,
-                     struct binding *__domainbinding)
-     internal_function;
+                     struct binding *__domainbinding);
 
 #ifdef IN_LIBGLOCALE
 char *_nl_find_msg (struct loaded_l10nfile *domain_file,
                    struct binding *domainbinding, const char *encoding,
                    const char *msgid,
-                   size_t *lengthp)
-     internal_function;
+                   size_t *lengthp);
 #else
 char *_nl_find_msg (struct loaded_l10nfile *domain_file,
                    struct binding *domainbinding, const char *msgid,
-                   int convert, size_t *lengthp)
-     internal_function;
+                   int convert, size_t *lengthp);
 #endif
 
 /* The internal variables in the standalone libintl.a must have different
index a15436253931ca58ffd3b8a333dadae221d9c465..caa8d0f4661031af31f9add302b46ba8d2c2b0cf 100644 (file)
    in gettextP.h.
  */
 
-#ifndef internal_function
-# define internal_function
-#endif
-
 #ifndef LIBINTL_SHLIB_EXPORTED
 # define LIBINTL_SHLIB_EXPORTED
 #endif
index 60b4373486fac570d46797e63dc67c743c59e34a..a8cf94c4af351add245749a55312a1b8ed914394 100644 (file)
@@ -679,7 +679,6 @@ __libc_lock_define_initialized_recursive (static, lock);
 /* Load the message catalogs specified by FILENAME.  If it is no valid
    message catalog do nothing.  */
 void
-internal_function
 _nl_load_domain (struct loaded_l10nfile *domain_file,
                 struct binding *domainbinding)
 {
@@ -1256,7 +1255,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
 
 #ifdef _LIBC
 void
-internal_function __libc_freeres_fn_section
+__libc_freeres_fn_section
 _nl_unload_domain (struct loaded_domain *domain)
 {
   size_t i;
index 18c204a33cb2f9f8c68174002b58f8c62d71b273..0b499e3bd65d0d57234258701c7cffd4c89013bb 100644 (file)
@@ -107,10 +107,6 @@ char *alloca ();
 # include "glthread/lock.h"
 #endif
 
-#ifndef internal_function
-# define internal_function
-#endif
-
 /* Some optimizations for glibc.  */
 #ifdef _LIBC
 # define FEOF(fp)              feof_unlocked (fp)
@@ -180,8 +176,7 @@ static size_t maxmap;
 
 
 /* Prototypes for local functions.  */
-static size_t read_alias_file (const char *fname, int fname_len)
-     internal_function;
+static size_t read_alias_file (const char *fname, int fname_len);
 static int extend_alias_table (void);
 static int alias_compare (const struct alias_map *map1,
                          const struct alias_map *map2);
@@ -262,7 +257,6 @@ _nl_expand_alias (const char *name)
 # endif
 
 static size_t
-internal_function
 read_alias_file (const char *fname, int fname_len)
 {
   FILE *fp;
index 6bff9a212e6a7bc671513da65e23dcae6825d626..47cf2d56dd56f3f4f44ecfe29da98616518b89d6 100644 (file)
@@ -56,7 +56,6 @@ const struct expression GERMANIC_PLURAL =
 };
 
 void
-internal_function
 EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
                           const struct expression **pluralp,
                           unsigned long int *npluralsp)
index c4c7153ad533ed49bae75fece62ff1e857ef9781..c00984c0ac73efb2b7f9399bc6de1bdb1bb16d38 100644 (file)
 #ifndef _PLURAL_EXP_H
 #define _PLURAL_EXP_H
 
-#ifndef internal_function
-# define internal_function
-#endif
-
 #ifndef attribute_hidden
 # define attribute_hidden
 #endif
@@ -105,14 +101,12 @@ struct parse_args
 # define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
 #endif
 
-extern void FREE_EXPRESSION (struct expression *exp)
-     internal_function;
+extern void FREE_EXPRESSION (struct expression *exp);
 extern int PLURAL_PARSE (struct parse_args *arg);
 extern const struct expression GERMANIC_PLURAL attribute_hidden;
 extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
                                       const struct expression **pluralp,
-                                      unsigned long int *npluralsp)
-     internal_function;
+                                      unsigned long int *npluralsp);
 
 #if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE)
 extern unsigned long int plural_eval (const struct expression *pexp,
index be78cebf8f6cb4bf855182129ce480e1de02a68a..858601be0379bb5c7fac45f10fde1e467cbc783b 100644 (file)
@@ -1,6 +1,6 @@
 %{
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000-2020 Free Software Foundation, Inc.
+   Copyright (C) 2000-2023 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
 
    This program is free software: you can redistribute it and/or modify
@@ -200,7 +200,6 @@ exp:          exp '?' exp ':' exp
 %%
 
 void
-internal_function
 FREE_EXPRESSION (struct expression *exp)
 {
   if (exp == NULL)