summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-12 17:50:11 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-12 17:50:11 +0100
commit626e1d4f0373fcd287db525b994f7342132a3216 (patch)
tree82b7f54bc8a47b8431400c56cd59e049338dc6f3 /include
parentc07e7ab63262f5644425e1997c0ea4aa6522bc14 (diff)
downloadwolfbones-626e1d4f0373fcd287db525b994f7342132a3216.tar.gz
wolfbones-626e1d4f0373fcd287db525b994f7342132a3216.tar.bz2
gettext fixed on OpenBSD
Diffstat (limited to 'include')
-rw-r--r--include/wolf/port/gettext.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/wolf/port/gettext.h b/include/wolf/port/gettext.h
index 76e4789..0a92ae5 100644
--- a/include/wolf/port/gettext.h
+++ b/include/wolf/port/gettext.h
@@ -32,14 +32,24 @@
/* some distributors like to disable NLS */
#if ENABLE_NLS
+/* Some older versions of libintl.h make tests for the value __APPLE_CC though
+ * this macro can be undefined! Nice, defining it here as 0.
+ * (Noticed on OpenBSD 4.3 with libintl
+ */
+#if !defined( __APPLE_CC )
+#define __APPLE_CC__ 0
+#endif
+
/* define a proper prototype with format_arg so that gcc doesn't croak. This
* is a problem on systems which have an onlder libintl.h where the declarations
* are missing. So we define a first prototype here and hope the compiler survives
* the redefiniton in libintl.h but for a format_arg (urgh!).
*/
#if defined __GNUC__
+#if GCC_VERSION >= 40000
extern char *gettext( const char *__msgid ) __attribute__ ( ( format_arg ( 1 ) ) );
#endif
+#endif
#include <libintl.h> /* for gettext, bindtextdomain */