summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/weechat.c4
-rw-r--r--src/common/weechat.h6
2 files changed, 9 insertions, 1 deletions
diff --git a/src/common/weechat.c b/src/common/weechat.c
index 41ab68191..66d5fea4d 100644
--- a/src/common/weechat.c
+++ b/src/common/weechat.c
@@ -52,7 +52,9 @@
#include <iconv.h>
#endif
+#ifdef HAVE_LANGINFO_CODESET
#include <langinfo.h>
+#endif
#include "weechat.h"
#include "weeconfig.h"
@@ -739,7 +741,9 @@ main (int argc, char *argv[])
textdomain (PACKAGE);
#endif
+ #ifdef HAVE_LANGINFO_CODESET
local_charset = strdup (nl_langinfo (CODESET));
+ #endif
signal (SIGINT, my_sigint); /* ignore SIGINT signal */
signal (SIGSEGV, my_sigsegv); /* crash dump when SIGSEGV is received */
diff --git a/src/common/weechat.h b/src/common/weechat.h
index 24520765e..6b40fe965 100644
--- a/src/common/weechat.h
+++ b/src/common/weechat.h
@@ -30,7 +30,11 @@
#if defined(ENABLE_NLS) && !defined(_)
#include <locale.h>
- #include <libintl.h>
+ #ifdef HAVE_LIBINTL_H
+ #include <libintl.h>
+ #else
+ #include "../../intl/libintl.h"
+ #endif
#define _(x) gettext(x)
#ifdef gettext_noop
#define N_(string) gettext_noop (string)