summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo/lib/gettext.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/texinfo/lib/gettext.h')
-rw-r--r--contrib/texinfo/lib/gettext.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/contrib/texinfo/lib/gettext.h b/contrib/texinfo/lib/gettext.h
index 4ab74d9..8b262f4 100644
--- a/contrib/texinfo/lib/gettext.h
+++ b/contrib/texinfo/lib/gettext.h
@@ -27,13 +27,21 @@
#else
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
-#if 0
-/* no thanks, not ready to go const --karl, 26feb02 */
# define gettext(Msgid) ((const char *) (Msgid))
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
@@ -46,20 +54,7 @@
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
-#else /* not 0 */
-# define gettext(Msgid) ((Msgid))
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define ngettext(Msgid1, Msgid2, N) \
- ((N) == 1 ? (Msgid1) : (Msgid2))
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- ((N) == 1 ? (Msgid1) : (Msgid2))
-# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
- ((N) == 1 ? (Msgid1) : (Msgid2))
-# define textdomain(Domainname) (Domainname)
-# define bindtextdomain(Domainname, Dirname) (Dirname)
-# define bind_textdomain_codeset(Domainname, Codeset) (Codeset)
-#endif /* 0 */
+
#endif
/* A pseudo function call that serves as a marker for the automated
OpenPOWER on IntegriCloud