summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-04-29 17:34:18 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:07:54 +0200
commit93e19a8b5ef634e1d3de523a63e47adb3cefab35 (patch)
treefd47896852f3ab84e0e341679cf215abac37786b
parent5e6d385b78c3424c3c7387088ad81b9db2c12774 (diff)
downloadexternal_gettext-93e19a8b5ef634e1d3de523a63e47adb3cefab35.zip
external_gettext-93e19a8b5ef634e1d3de523a63e47adb3cefab35.tar.gz
external_gettext-93e19a8b5ef634e1d3de523a63e47adb3cefab35.tar.bz2
Prefix all libintl specific functions with libintl_ instead of suffixing them
with __. Use preprocessor-level redirection in libgnuintl.h.
-rw-r--r--intl/ChangeLog18
-rw-r--r--intl/bindtextdom.c8
-rw-r--r--intl/dcgettext.c4
-rw-r--r--intl/dcigettext.c10
-rw-r--r--intl/dcngettext.c4
-rw-r--r--intl/dgettext.c4
-rw-r--r--intl/dngettext.c4
-rw-r--r--intl/gettext.c4
-rw-r--r--intl/gettextP.h49
-rw-r--r--intl/intl-compat.c66
-rw-r--r--intl/libgnuintl.h53
-rw-r--r--intl/ngettext.c4
-rw-r--r--intl/os2compat.c4
-rw-r--r--intl/plural-exp.h8
-rw-r--r--intl/textdomain.c6
-rw-r--r--tests/ChangeLog7
-rw-r--r--tests/plural-1-prg.c20
-rw-r--r--tests/tstgettext.c4
-rw-r--r--tests/tstngettext.c4
19 files changed, 146 insertions, 135 deletions
diff --git a/intl/ChangeLog b/intl/ChangeLog
index 0df7ed4..80cefa3 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,3 +1,21 @@
+2002-04-27 Bruno Haible <bruno@clisp.org>
+
+ * libgnuintl.h: Redirect every function to the one prefixed with
+ "libintl_". Remove __OPTIMIZED variants.
+ * gettextP.h: Use prefix "libintl_" instead of suffix "__".
+ * dcigettext.c: Likewise.
+ * dcgettext.c: Likewise.
+ * dgettext.c: Likewise.
+ * gettext.c: Likewise.
+ * dcngettext.c: Likewise.
+ * dngettext.c: Likewise.
+ * ngettext.c: Likewise.
+ * textdomain.c: Likewise.
+ * bindtextdom.c: Likewise.
+ * plural-exp.h: Likewise.
+ * os2compat.c: Likewise.
+ * intl-compat.c: Likewise.
+
2002-04-24 Bruno Haible <bruno@clisp.org>
* gettext-0.11.2 released.
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
index a3c233d..d582ce1 100644
--- a/intl/bindtextdom.c
+++ b/intl/bindtextdom.c
@@ -45,8 +45,8 @@
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
@@ -77,8 +77,8 @@ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
# define strdup(str) __strdup (str)
# endif
#else
-# define BINDTEXTDOMAIN bindtextdomain__
-# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
#endif
/* Prototypes for local functions. */
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
index 70ee3ba..ca6a1c8 100644
--- a/intl/dcgettext.c
+++ b/intl/dcgettext.c
@@ -37,8 +37,8 @@
# define DCGETTEXT __dcgettext
# define DCIGETTEXT __dcigettext
#else
-# define DCGETTEXT dcgettext__
-# define DCIGETTEXT dcigettext__
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index afbb181..329dc09 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -102,10 +102,10 @@ extern int errno;
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
@@ -344,7 +344,7 @@ typedef unsigned char transmem_block_t;
#ifdef _LIBC
# define DCIGETTEXT __dcigettext
#else
-# define DCIGETTEXT dcigettext__
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Lock variable to protect the global data in the gettext implementation. */
diff --git a/intl/dcngettext.c b/intl/dcngettext.c
index d31ff9b..17d9ce3 100644
--- a/intl/dcngettext.c
+++ b/intl/dcngettext.c
@@ -37,8 +37,8 @@
# define DCNGETTEXT __dcngettext
# define DCIGETTEXT __dcigettext
#else
-# define DCNGETTEXT dcngettext__
-# define DCIGETTEXT dcigettext__
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
diff --git a/intl/dgettext.c b/intl/dgettext.c
index 17b0442..cf5b403 100644
--- a/intl/dgettext.c
+++ b/intl/dgettext.c
@@ -39,8 +39,8 @@
# define DGETTEXT __dgettext
# define DCGETTEXT INTUSE(__dcgettext)
#else
-# define DGETTEXT dgettext__
-# define DCGETTEXT dcgettext__
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
diff --git a/intl/dngettext.c b/intl/dngettext.c
index 2b9ff88..0afbd2e 100644
--- a/intl/dngettext.c
+++ b/intl/dngettext.c
@@ -39,8 +39,8 @@
# define DNGETTEXT __dngettext
# define DCNGETTEXT INTUSE(__dcngettext)
#else
-# define DNGETTEXT dngettext__
-# define DCNGETTEXT dcngettext__
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
diff --git a/intl/gettext.c b/intl/gettext.c
index e52d8ae..43d689f 100644
--- a/intl/gettext.c
+++ b/intl/gettext.c
@@ -44,8 +44,8 @@
# define GETTEXT __gettext
# define DCGETTEXT INTUSE(__dcgettext)
#else
-# define GETTEXT gettext__
-# define DCGETTEXT dcgettext__
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
#endif
/* Look up MSGID in the current default message catalog for the current
diff --git a/intl/gettextP.h b/intl/gettextP.h
index 4e3a5b2..0fff5a9 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -176,28 +176,33 @@ extern char *__bindtextdomain PARAMS ((const char *__domainname,
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
#else
-extern char *gettext__ PARAMS ((const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dcngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *dcigettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
- const char *__codeset));
+extern char *libintl_gettext PARAMS ((const char *__msgid));
+extern char *libintl_dgettext PARAMS ((const char *__domainname,
+ const char *__msgid));
+extern char *libintl_dcgettext PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+extern char *libintl_ngettext PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dcngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category));
+extern char *libintl_dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+extern char *libintl_textdomain PARAMS ((const char *__domainname));
+extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
+ const char *__codeset));
#endif
/* @@ begin of epilog @@ */
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
index 0a06ce9..5d0b71e 100644
--- a/intl/intl-compat.c
+++ b/intl/intl-compat.c
@@ -1,6 +1,6 @@
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
- Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
+ Copyright (C) 1995, 2000-2002 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
@@ -26,47 +26,11 @@
/* @@ end of prolog @@ */
-/* This file redirects the gettext functions (without prefix or suffix) to
- those defined in the included GNU gettext library (with "__" suffix).
- It is compiled into libintl when the included GNU gettext library is
- configured --with-included-gettext.
-
- This redirection works also in the case that the system C library or
- the system libintl library contain gettext/textdomain/... functions.
- If it didn't, we would need to add preprocessor level redirections to
- libgnuintl.h of the following form:
-
-# define gettext gettext__
-# define dgettext dgettext__
-# define dcgettext dcgettext__
-# define ngettext ngettext__
-# define dngettext dngettext__
-# define dcngettext dcngettext__
-# define textdomain textdomain__
-# define bindtextdomain bindtextdomain__
-# define bind_textdomain_codeset bind_textdomain_codeset__
-
- How does this redirection work? There are two cases.
- A. When libintl.a is linked into an executable, it works because
- functions defined in the executable always override functions in
- the shared libraries.
- B. When libintl.so is used, it works because
- 1. those systems defining gettext/textdomain/... in the C library
- (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
- ELF systems and define these symbols as weak, thus explicitly
- letting other shared libraries override it.
- 2. those systems defining gettext/textdomain/... in a standalone
- libintl.so library (namely, Solaris 2.3 and newer) have this
- shared library in /usr/lib, and the linker will search /usr/lib
- *after* the directory where the GNU gettext library is installed.
-
- A third case, namely when libintl.a is linked into a shared library
- whose name is not libintl.so, is not supported. In this case, on
- Solaris, when -lintl precedes the linker option for the shared library
- containing GNU gettext, the system's gettext would indeed override
- the GNU gettext. Anyone doing this kind of stuff must be clever enough
- to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
- command line. */
+/* This file redirects the gettext functions (without prefix) to those
+ defined in the included GNU libintl library (with "libintl_" prefix).
+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+ has the redirections primarily in the <libintl.h> include file. */
#undef gettext
@@ -84,7 +48,7 @@ char *
gettext (msgid)
const char *msgid;
{
- return gettext__ (msgid);
+ return libintl_gettext (msgid);
}
@@ -93,7 +57,7 @@ dgettext (domainname, msgid)
const char *domainname;
const char *msgid;
{
- return dgettext__ (domainname, msgid);
+ return libintl_dgettext (domainname, msgid);
}
@@ -103,7 +67,7 @@ dcgettext (domainname, msgid, category)
const char *msgid;
int category;
{
- return dcgettext__ (domainname, msgid, category);
+ return libintl_dcgettext (domainname, msgid, category);
}
@@ -113,7 +77,7 @@ ngettext (msgid1, msgid2, n)
const char *msgid2;
unsigned long int n;
{
- return ngettext__ (msgid1, msgid2, n);
+ return libintl_ngettext (msgid1, msgid2, n);
}
@@ -124,7 +88,7 @@ dngettext (domainname, msgid1, msgid2, n)
const char *msgid2;
unsigned long int n;
{
- return dngettext__ (domainname, msgid1, msgid2, n);
+ return libintl_dngettext (domainname, msgid1, msgid2, n);
}
@@ -136,7 +100,7 @@ dcngettext (domainname, msgid1, msgid2, n, category)
unsigned long int n;
int category;
{
- return dcngettext__ (domainname, msgid1, msgid2, n, category);
+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
}
@@ -144,7 +108,7 @@ char *
textdomain (domainname)
const char *domainname;
{
- return textdomain__ (domainname);
+ return libintl_textdomain (domainname);
}
@@ -153,7 +117,7 @@ bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
{
- return bindtextdomain__ (domainname, dirname);
+ return libintl_bindtextdomain (domainname, dirname);
}
@@ -162,5 +126,5 @@ bind_textdomain_codeset (domainname, codeset)
const char *domainname;
const char *codeset;
{
- return bind_textdomain_codeset__ (domainname, codeset);
+ return libintl_bind_textdomain_codeset (domainname, codeset);
}
diff --git a/intl/libgnuintl.h b/intl/libgnuintl.h
index 1387e70..ad2aebc 100644
--- a/intl/libgnuintl.h
+++ b/intl/libgnuintl.h
@@ -40,7 +40,6 @@
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
-# define gettext gettext
#endif
/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
@@ -57,18 +56,45 @@
extern "C" {
#endif
+
+/* We redirect the functions to those prefixed with "libintl_". This is
+ necessary, because some systems define gettext/textdomain/... in the C
+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+ If we used the unprefixed names, there would be cases where the
+ definition in the C library would override the one in the libintl.so
+ shared library. Recall that on ELF systems, the symbols are looked
+ up in the following order:
+ 1. in the executable,
+ 2. in the shared libraries specified on the link command line, in order,
+ 3. in the dependencies of the shared libraries specified on the link
+ command line,
+ 4. in the dlopen()ed shared libraries, in the order in which they were
+ dlopen()ed.
+ The definition in the C library would override the one in libintl.so if
+ either
+ * -lc is given on the link command line and -lintl isn't, or
+ * -lc is given on the link command line before -lintl, or
+ * libintl.so is a dependency of a dlopen()ed shared library but not
+ linked to the executable at link time.
+ Since Solaris gettext() behaves differently than GNU gettext(), this
+ would be unacceptable. */
+
+
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
+#define gettext libintl_gettext
extern char *gettext _INTL_PARAMS ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
+#define dgettext libintl_dgettext
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
+#define dcgettext libintl_dcgettext
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid,
int __category));
@@ -76,12 +102,14 @@ extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
+#define ngettext libintl_ngettext
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
const char *__msgid2,
unsigned long int __n));
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
+#define dngettext libintl_dngettext
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
@@ -89,6 +117,7 @@ extern char *dngettext _INTL_PARAMS ((const char *__domainname,
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
+#define dcngettext libintl_dcngettext
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
const char *__msgid1,
const char *__msgid2,
@@ -99,38 +128,22 @@ extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
+#define textdomain libintl_textdomain
extern char *textdomain _INTL_PARAMS ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
+#define bindtextdomain libintl_bindtextdomain
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
const char *__dirname));
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
+#define bind_textdomain_codeset libintl_bind_textdomain_codeset
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
const char *__codeset));
-/* Optimized version of the functions above. */
-#if defined __OPTIMIZED
-/* These are macros, but could also be inline functions. */
-
-# define gettext(msgid) \
- dgettext (NULL, msgid)
-
-# define dgettext(domainname, msgid) \
- dcgettext (domainname, msgid, LC_MESSAGES)
-
-# define ngettext(msgid1, msgid2, n) \
- dngettext (NULL, msgid1, msgid2, n)
-
-# define dngettext(domainname, msgid1, msgid2, n) \
- dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
-
-#endif /* Optimizing. */
-
-
#ifdef __cplusplus
}
#endif
diff --git a/intl/ngettext.c b/intl/ngettext.c
index b42ff6a..69fe1f7 100644
--- a/intl/ngettext.c
+++ b/intl/ngettext.c
@@ -46,8 +46,8 @@
# define NGETTEXT __ngettext
# define DCNGETTEXT INTUSE(__dcngettext)
#else
-# define NGETTEXT ngettext__
-# define DCNGETTEXT dcngettext__
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
#endif
/* Look up MSGID in the current default message catalog for the current
diff --git a/intl/os2compat.c b/intl/os2compat.c
index 3ca8266..c8dc33e 100644
--- a/intl/os2compat.c
+++ b/intl/os2compat.c
@@ -39,7 +39,7 @@ _nl_getenv (const char *name)
}
/* A fixed size buffer. */
-char _nl_default_dirname__[MAXPATHLEN+1];
+char libintl_nl_default_dirname[MAXPATHLEN+1];
char *_nlos2_libdir = NULL;
char *_nlos2_localealiaspath = NULL;
@@ -94,5 +94,5 @@ nlos2_initialize ()
}
if (strlen (_nlos2_localedir) <= MAXPATHLEN)
- strcpy (_nl_default_dirname__, _nlos2_localedir);
+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
}
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
index 93cdaef..9e5d165 100644
--- a/intl/plural-exp.h
+++ b/intl/plural-exp.h
@@ -98,10 +98,10 @@ struct parse_args
# define GERMANIC_PLURAL __gettext_germanic_plural
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
#elif defined (IN_LIBINTL)
-# define FREE_EXPRESSION gettext_free_exp__
-# define PLURAL_PARSE gettextparse__
-# define GERMANIC_PLURAL gettext_germanic_plural__
-# define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
#else
# define FREE_EXPRESSION free_plural_expression
# define PLURAL_PARSE parse_plural_expression
diff --git a/intl/textdomain.c b/intl/textdomain.c
index 8fb4ea0..f259c69 100644
--- a/intl/textdomain.c
+++ b/intl/textdomain.c
@@ -44,8 +44,8 @@
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
#endif
/* @@ end of prolog @@ */
@@ -67,7 +67,7 @@ extern const char *_nl_current_default_domain attribute_hidden;
# define strdup(str) __strdup (str)
# endif
#else
-# define TEXTDOMAIN textdomain__
+# define TEXTDOMAIN libintl_textdomain
#endif
/* Lock variable to protect the global data in the gettext implementation. */
diff --git a/tests/ChangeLog b/tests/ChangeLog
index f7e4b9b..8692efe 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-27 Bruno Haible <bruno@clisp.org>
+
+ * plural-1-prg.c: No need to redirect textdomain() etc., now done in
+ libgnuintl.h.
+ * tstgettext.c: Likewise.
+ * tstngettext.c: Likewise.
+
2002-04-24 Bruno Haible <bruno@clisp.org>
* gettext-0.11.2 released.
diff --git a/tests/plural-1-prg.c b/tests/plural-1-prg.c
index fa5d0a2..e1acd2d 100644
--- a/tests/plural-1-prg.c
+++ b/tests/plural-1-prg.c
@@ -1,4 +1,19 @@
-/* Test program, used by the plural-1 test. */
+/* Test program, used by the plural-1 test.
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -10,9 +25,6 @@
#include "xsetenv.h"
/* Make sure we use the included libintl, not the system's one. */
-#define textdomain textdomain__
-#define bindtextdomain bindtextdomain__
-#define ngettext ngettext__
#undef _LIBINTL_H
#include "libgnuintl.h"
diff --git a/tests/tstgettext.c b/tests/tstgettext.c
index 90efb69..e19b187 100644
--- a/tests/tstgettext.c
+++ b/tests/tstgettext.c
@@ -35,10 +35,6 @@
#define HAVE_SETLOCALE 1
/* Make sure we use the included libintl, not the system's one. */
-#define textdomain textdomain__
-#define bindtextdomain bindtextdomain__
-#define gettext gettext__
-#define dgettext dgettext__
#undef _LIBINTL_H
#include "libgnuintl.h"
diff --git a/tests/tstngettext.c b/tests/tstngettext.c
index 3089073..4a2c677 100644
--- a/tests/tstngettext.c
+++ b/tests/tstngettext.c
@@ -33,10 +33,6 @@
#define HAVE_SETLOCALE 1
/* Make sure we use the included libintl, not the system's one. */
-#define textdomain textdomain__
-#define bindtextdomain bindtextdomain__
-#define gettext gettext__
-#define dngettext dngettext__
#undef _LIBINTL_H
#include "libgnuintl.h"