From bdc4e6f675930e28bfcb373225ef8cb4a9e47340 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Mon, 16 Dec 2013 02:33:24 +0000 Subject: Make reasonably recent autotools happy; remove gettext files --- intl/loadmsgcat.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'intl/loadmsgcat.c') diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index 2520c8c..9abee08 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -1,20 +1,18 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2008, 2010 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. + 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 + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Tell glibc's to provide a prototype for mempcpy(). This must come before because may include @@ -760,10 +758,12 @@ get_sysdep_segment_value (const char *name) /* Test for a glibc specific printf() format directive flag. */ if (name[0] == 'I' && name[1] == '\0') { -#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) +#if defined _LIBC \ + || ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) \ + && !defined __UCLIBC__) /* The 'I' flag, in numeric format directives, replaces ASCII digits with the 'outdigits' defined in the LC_CTYPE locale facet. This is - used for Farsi (Persian) and maybe Arabic. */ + used for Farsi (Persian), some Indic languages, and maybe Arabic. */ return "I"; #else return ""; @@ -976,6 +976,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file, ((char *) data + W (domain->must_swap, data->sysdep_segments_offset)); sysdep_segment_values = + (const char **) alloca (n_sysdep_segments * sizeof (const char *)); for (i = 0; i < n_sysdep_segments; i++) { @@ -1258,8 +1259,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file, /* This is an invalid revision. */ invalid: /* This is an invalid .mo file. */ - if (domain->malloced) - free (domain->malloced); + free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); @@ -1274,6 +1274,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file, /* No caches of converted translations so far. */ domain->conversions = NULL; domain->nconversions = 0; + gl_rwlock_init (domain->conversions_lock); /* Get the header entry and look for a plural specification. */ #ifdef IN_LIBGLOCALE @@ -1303,7 +1304,7 @@ _nl_unload_domain (struct loaded_domain *domain) size_t i; if (domain->plural != &__gettext_germanic_plural) - __gettext_free_exp (domain->plural); + __gettext_free_exp ((struct expression *) domain->plural); for (i = 0; i < domain->nconversions; i++) { @@ -1315,11 +1316,10 @@ _nl_unload_domain (struct loaded_domain *domain) if (convd->conv != (__gconv_t) -1) __gconv_close (convd->conv); } - if (domain->conversions != NULL) - free (domain->conversions); + free (domain->conversions); + __libc_rwlock_fini (domain->conversions_lock); - if (domain->malloced) - free (domain->malloced); + free (domain->malloced); # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) -- cgit v1.2.3