This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
another gettext patch
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: another gettext patch
- From: Bruno Haible <haible at ilog dot fr>
- Date: Wed, 3 May 2000 12:59:16 +0200 (MET DST)
One more gettext tweak: The defaulting of domainname in dcigettext() must
be done before setting up a 'struct known_translation_t' for tfind.
Otherwise, with my previous fix for transcmp(), transcmp ends up passing
NULL to strcmp.
2000-05-03 Bruno Haible <clisp.cons.org>
* intl/dcigettext.c (dcigettext): Do the defaulting of 'domainname'
before calling tfind.
*** intl/dcigettext.c.bak Sat Apr 29 09:02:02 2000
--- intl/dcigettext.c Wed May 3 10:33:11 2000
***************
*** 372,377 ****
--- 372,383 ----
__libc_rwlock_rdlock (_nl_state_lock);
+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
+ CATEGORY is not LC_MESSAGES this might not make much sense but the
+ definition left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
#if defined HAVE_TSEARCH || defined _LIBC
msgid_len = strlen (msgid1) + 1;
***************
*** 399,410 ****
/* See whether this is a SUID binary or not. */
DETERMINE_SECURE;
- /* If DOMAINNAME is NULL, we are interested in the default domain. If
- CATEGORY is not LC_MESSAGES this might not make much sense but the
- definition left this undefined. */
- if (domainname == NULL)
- domainname = _nl_current_default_domain;
-
/* First find matching binding. */
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
--- 407,412 ----