aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2001-12-02 06:40:17 +0000
committerPeter Johnson <peter@tortall.net>2001-12-02 06:40:17 +0000
commit3b496cdde785d6a2d9f80f5ba3feb1cc87cba12c (patch)
treed7ff8dd306ee67a99695435081574acc72241140 /util.h
parentff7a4c54fad94fa10c91cdaefae3b8a8400eb965 (diff)
downloadyasm-3b496cdde785d6a2d9f80f5ba3feb1cc87cba12c.tar.gz
Do intl more correctly. nointl/libintl.h is unnecessary; it can be detected
in util.h by the ENABLE_NLS define. Fix Mkfiles to reflect. Actually enable if available in main(). svn path=/trunk/yasm/; revision=372
Diffstat (limited to 'util.h')
-rw-r--r--util.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/util.h b/util.h
index fb4e0d50..a722c57b 100644
--- a/util.h
+++ b/util.h
@@ -38,10 +38,30 @@
#if defined(lint)
/*@dependent@*/ const char *gettext(const char *s);
+#define _(String) gettext(String)
#else
-#include <libintl.h>
+# ifdef HAVE_LOCALE_H
+# include <locale.h>
+# endif
+
+# ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext(String)
+# else
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) while (0) /* nothing */
+# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
+# define _(String) (String)
+# endif
+#endif
+
+#ifdef gettext_noop
+# define N_(String) gettext_noop(String)
+#else
+# define N_(String) (String)
#endif
-#define _(String) gettext(String)
#if !defined(HAVE_MERGESORT) || defined(lint)
int mergesort(void *base, size_t nmemb, size_t size,