aboutsummaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
Diffstat (limited to 'intl')
-rw-r--r--intl/bindtextdom.c24
-rw-r--r--intl/dcigettext.c26
2 files changed, 24 insertions, 26 deletions
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
index 39256ed..546da8e 100644
--- a/intl/bindtextdom.c
+++ b/intl/bindtextdom.c
@@ -1,5 +1,5 @@
/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,9 +60,7 @@
/* Contains the default location of the message catalogs. */
extern const char _nl_default_dirname[];
#ifdef _LIBC
-extern const char _nl_default_dirname_internal[] attribute_hidden;
-#else
-# define INTUSE(name) name
+libc_hidden_proto (_nl_default_dirname)
#endif
/* List with bindings of specific domains. */
@@ -152,8 +150,8 @@ set_binding_values (domainname, dirnamep, codesetp)
char *result = binding->dirname;
if (strcmp (dirname, result) != 0)
{
- if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
- result = (char *) INTUSE(_nl_default_dirname);
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ result = (char *) _nl_default_dirname;
else
{
#if defined _LIBC || defined HAVE_STRDUP
@@ -168,7 +166,7 @@ set_binding_values (domainname, dirnamep, codesetp)
if (__builtin_expect (result != NULL, 1))
{
- if (binding->dirname != INTUSE(_nl_default_dirname))
+ if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
binding->dirname = result;
@@ -222,7 +220,7 @@ set_binding_values (domainname, dirnamep, codesetp)
{
/* Simply return the default values. */
if (dirnamep)
- *dirnamep = INTUSE(_nl_default_dirname);
+ *dirnamep = _nl_default_dirname;
if (codesetp)
*codesetp = NULL;
}
@@ -244,11 +242,11 @@ set_binding_values (domainname, dirnamep, codesetp)
if (dirname == NULL)
/* The default value. */
- dirname = INTUSE(_nl_default_dirname);
+ dirname = _nl_default_dirname;
else
{
- if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
- dirname = INTUSE(_nl_default_dirname);
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ dirname = _nl_default_dirname;
else
{
char *result;
@@ -271,7 +269,7 @@ set_binding_values (domainname, dirnamep, codesetp)
}
else
/* The default value. */
- new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
+ new_binding->dirname = (char *) _nl_default_dirname;
new_binding->codeset_cntr = 0;
@@ -327,7 +325,7 @@ set_binding_values (domainname, dirnamep, codesetp)
if (0)
{
failed_codeset:
- if (new_binding->dirname != INTUSE(_nl_default_dirname))
+ if (new_binding->dirname != _nl_default_dirname)
free (new_binding->dirname);
failed_dirname:
free (new_binding);
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index d711172..75762ea 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -1,5 +1,5 @@
/* Implementation of the internal dcigettext function.
- Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -236,13 +236,6 @@ transcmp (p1, p2)
}
#endif
-#ifndef INTVARDEF
-# define INTVARDEF
-#endif
-#ifndef INTUSE
-# define INTUSE(name) name
-#endif
-
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
const char _nl_default_default_domain[] attribute_hidden = "messages";
@@ -252,8 +245,15 @@ const char *_nl_current_default_domain attribute_hidden
= _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
+
+#ifdef _LIBC
+extern const char _nl_default_dirname[];
+libc_hidden_proto (_nl_default_dirname)
+#endif
const char _nl_default_dirname[] = LOCALEDIR;
-INTVARDEF (_nl_default_dirname)
+#ifdef _LIBC
+libc_hidden_data_def (_nl_default_dirname)
+#endif
/* List with bindings of specific domains created by bindtextdomain()
calls. */
@@ -485,7 +485,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
}
if (binding == NULL)
- dirname = (char *) INTUSE(_nl_default_dirname);
+ dirname = (char *) _nl_default_dirname;
else if (binding->dirname[0] == '/')
dirname = binding->dirname;
else
@@ -882,7 +882,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
goto converted;
}
- inbuf = result;
+ inbuf = (const unsigned char *) result;
# else
# if HAVE_ICONV
const char *inptr = (const char *) inbuf;
@@ -950,7 +950,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, lengthp)
newmem->next = transmem_list;
transmem_list = newmem;
- freemem = newmem->data;
+ freemem = (unsigned char *) newmem->data;
freemem_size -= offsetof (struct transmem_list, data);
# else
transmem_list = newmem;
@@ -1161,7 +1161,7 @@ libc_freeres_fn (free_mem)
{
struct binding *oldp = _nl_domain_bindings;
_nl_domain_bindings = _nl_domain_bindings->next;
- if (oldp->dirname != INTUSE(_nl_default_dirname))
+ if (oldp->dirname != _nl_default_dirname)
/* Yes, this is a pointer comparison. */
free (oldp->dirname);
free (oldp->codeset);