]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
LC_MESSAGES undeclared by MinGW
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 5 Mar 2015 14:30:20 +0000 (15:30 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 5 Mar 2015 14:30:20 +0000 (15:30 +0100)
Including gettext.h produces an error because LC_MESSAGES is not declared
by MinGW. To solve this, the gettext.h file isn't included on MinGW and
the missing functions are manually declared.

include/conf.h

index 2b89e1ea75dae95b54ca07d2fbaed49fef047649..aa59b057339836704e32514b5d51e54bf20dcfdb 100755 (executable)
@@ -138,7 +138,12 @@ int mkstemps(char *template, int suffixlen);
 #define mkstemp(template) mkstemps(template,0)
 #endif
 
+#ifdef __MINGW32__
+#define pgettext(msgctxt,msgid) (msgid)
+#define ngettext(singular,plural,number) (plural)
+#else
 #include "gettext.h"
+#endif
 #if defined(ENABLE_NLS) && defined(HAVE_LIBINTL_H)
 #define _(String) gettext(String)
 #ifdef gettext_noop