summaryrefslogtreecommitdiffstats
path: root/intl/loadmsgcat.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-01-23 17:23:30 +0000
committerBruno Haible <bruno@clisp.org>2001-01-23 17:23:30 +0000
commit66465dca1a55e2082adb562f2925bd02cb5180e4 (patch)
treeebdb3297d20ca78dd1dd309f9d885618a31bbf32 /intl/loadmsgcat.c
parentcc5960a0ef886784891b4c1a7316c1659b73a7b6 (diff)
downloadexternal_gettext-66465dca1a55e2082adb562f2925bd02cb5180e4.zip
external_gettext-66465dca1a55e2082adb562f2925bd02cb5180e4.tar.gz
external_gettext-66465dca1a55e2082adb562f2925bd02cb5180e4.tar.bz2
Avoid name clash between functions defined in libc and functions defined in
libintl.
Diffstat (limited to 'intl/loadmsgcat.c')
-rw-r--r--intl/loadmsgcat.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 34f1e66..d8c3972 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -89,6 +89,16 @@ char *alloca ();
# define munmap __munmap
#endif
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define PLURAL_PARSE __gettextparse
+#else
+# define PLURAL_PARSE gettextparse__
+#endif
+
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
@@ -431,7 +441,7 @@ _nl_load_domain (domain_file)
is passed down to the parser. */
plural += 7;
args.cp = plural;
- if (__gettextparse (&args) != 0)
+ if (PLURAL_PARSE (&args) != 0)
goto no_plural;
domain->plural = args.res;
}