summaryrefslogtreecommitdiff
path: root/games/wesnoth/files/patch-src-gettext.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'games/wesnoth/files/patch-src-gettext.hpp')
-rw-r--r--games/wesnoth/files/patch-src-gettext.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/games/wesnoth/files/patch-src-gettext.hpp b/games/wesnoth/files/patch-src-gettext.hpp
index fd910d11a583..51cd88141e04 100644
--- a/games/wesnoth/files/patch-src-gettext.hpp
+++ b/games/wesnoth/files/patch-src-gettext.hpp
@@ -10,6 +10,31 @@
+#ifdef ENABLE_NLS
+# include <libintl.h>
+#else
++# define bind_textdomain_codeset(Domain, Codeset) "C"
++# define bindtextdomain(Domain, Directory) "/nonexistent"
++# define gettext(String) gettext_noop(String)
++# define ngettext(Singular, Plural, Number) gettext_noop(Number == 1 ? Singular : Plural)
++# define dgettext(Domain, String) gettext_noop(String)
++# define dngettext(Domain, Singular, Plural, Number) gettext_noop(Number == 1 ? Singular : Plural)
++# define dcgettext(Domain, String, Category) gettext_noop(String)
++# define dcngettext(Domain, Singular, Plural, Number, Category) gettext_noop(Number == 1 ? Singular : Plural)
++char *textdomain (const char *domainname);
++#endif
+
+ const char* egettext(const char*);
+ const char* sgettext(const char*);
+--- src/gettext.hpp~
++++ src/gettext.hpp
+@@ -35,7 +35,21 @@
+
+ // gettext-related declarations
+
+-#include <libintl.h>
++#include "wesconfig.h"
++
++#ifdef ENABLE_NLS
++# include <libintl.h>
++#else
+# define bind_textdomain_codeset(Domain,Codeset) "C"
+# define bindtextdomain(Domain,Dir) "/nonexistent"
+# define gettext(String) gettext_noop(String)