another gettext patch
Bruno Haible
haible@ilog.fr
Wed May 3 04:00:00 GMT 2000
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 ----
More information about the Libc-alpha
mailing list