mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2000-04-27 Ulrich Drepper <drepper@redhat.com> * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_initgroups): Handle overflows in conversion from ASCII. 2000-04-26 Jakub Jelinek <jakub@redhat.com> * Makeconfig (full_config_sysdirs): Renamed from full-config-sysdirs. * Makerules (full_config_sysdirs): Likewise. * MakeTAGS (full_config_sysdirs): Likewise. 2000-04-26 Jakub Jelinek <jakub@redhat.com> * .cvsignore: Remove linuxthreads. * po/.cvsignore: Remove *.pot. * posix/glob/.cvsignore: Removed. * sysdeps/unix/bsd/osf/.cvsignore: Removed. 2000-04-25 Andreas Jaeger <aj@suse.de> * conform/Makefile (distribute): Also distribute contents of subdirectories. * Makerules (no_deps): Remove abi-versions.h. * nis/nis_print_group_entry.c: Include alloca.h for alloca prototype. 2000-04-25 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc64/elf/Dist: Remove. * sysdeps/sparc/sparc64/elf/crtbegin.S: Remove. * sysdeps/sparc/sparc64/elf/crtbeginS.S: Remove. * sysdeps/sparc/sparc64/elf/crtend.S: Remove. * sysdeps/sparc/sparc64/elf/crtendS.S: Remove. * sysdeps/sparc/sparc64/elf/Makefile: Don't build crtbegin/crtend objects. 2000-04-25 Thorsten Kukuk <kukuk@suse.de> * nscd/grpcache.c: Fix gr_name pointer [PR/1702]. 2000-04-23 Bruno Haible <clisp.cons.org> * intl/dcigettext.c: Define _GNU_SOURCE as early as possible. * intl/l10nflist.c: Likewise. 2000-04-23 Bruno Haible <clisp.cons.org> * intl/bindtextdom.c [!_LIBC]: Define __libc_rwlock_define, __libc_rwlock_wrlock, __libc_rwlock_unlock as empty. * intl/textdomain.c [!_LIBC]: Likewise. * intl/dcigettext.c [!_LIBC]: Define __libc_rwlock_define_initialized, __libc_rwlock_rdlock, __libc_rwlock_unlock as empty. * intl/loadmsgcat.c (_nl_load_domain) [!_LIBC, !HAVE_ICONV]: Avoid syntax error. 2000-04-23 Bruno Haible <clisp.cons.org> * intl/dcigettext.c (_nl_find_msg): Do the plural treatment and character set conversion also in the case the translation was found after a hash collision or through binary search. Store the maximum index together with the converted message. Use iconv() when available. In case of out of memory during conversion, return the unconverted translated string, not NULL.
This commit is contained in:
@ -257,10 +257,12 @@ _nl_load_domain (domain_file)
|
||||
nullentry = _nl_find_msg (domain_file, "", 0);
|
||||
if (nullentry != NULL)
|
||||
{
|
||||
const char *charsetstr = strstr (nullentry, "charset=");
|
||||
const char *charsetstr;
|
||||
const char *plural;
|
||||
const char *nplurals;
|
||||
|
||||
#if defined _LIBC || HAVE_ICONV
|
||||
charsetstr = strstr (nullentry, "charset=");
|
||||
if (charsetstr != NULL)
|
||||
{
|
||||
size_t len;
|
||||
@ -271,12 +273,12 @@ _nl_load_domain (domain_file)
|
||||
len = strcspn (charsetstr, " \t\n");
|
||||
|
||||
charset = (char *) alloca (len + 1);
|
||||
#if defined _LIBC || HAVE_MEMPCPY
|
||||
# if defined _LIBC || HAVE_MEMPCPY
|
||||
*((char *) mempcpy (charset, charsetstr, len)) = '\0';
|
||||
#else
|
||||
# else
|
||||
memcpy (charset, charsetstr, len);
|
||||
charset[len] = '\0';
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* The output charset should normally be determined by the
|
||||
locale. But sometimes the locale is not used or not correctly
|
||||
@ -285,17 +287,18 @@ _nl_load_domain (domain_file)
|
||||
if (outcharset == NULL || outcharset[0] == '\0')
|
||||
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
|
||||
|
||||
#ifdef _LIBC
|
||||
# ifdef _LIBC
|
||||
if (__gconv_open (outcharset, charset, &domain->conv,
|
||||
GCONV_AVOID_NOCONV)
|
||||
!= __GCONV_OK)
|
||||
domain->conv = (__gconv_t) -1;
|
||||
#else
|
||||
# if HAVE_ICONV
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
domain->conv = iconv_open (outcharset, charset);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
#endif /* _LIBC || HAVE_ICONV */
|
||||
|
||||
/* Also look for a plural specification. */
|
||||
plural = strstr (nullentry, "plural=");
|
||||
|
Reference in New Issue
Block a user