aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-18 16:42:14 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-18 16:42:14 +0100
commit35f37ce7ee40aee2f8a8fcf13dee598a3e8020e7 (patch)
tree6f706d9fa09412e362ca0baed198bd1300b7fbb1
parent38705369ba11c6fa29f02c912d04f79403b9591f (diff)
downloadtigervnc-35f37ce7ee40aee2f8a8fcf13dee598a3e8020e7.tar.gz
tigervnc-35f37ce7ee40aee2f8a8fcf13dee598a3e8020e7.zip
Make sure LC_MESSAGES is defined without ENABLE_NLS
This is missing on Windows by default, and will cause the build to fail if ENABLE_NLS is disabled.
-rw-r--r--vncviewer/i18n.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/vncviewer/i18n.h b/vncviewer/i18n.h
index fd6c363d..58829d6c 100644
--- a/vncviewer/i18n.h
+++ b/vncviewer/i18n.h
@@ -28,6 +28,18 @@ pgettext_aux (const char *domain,
int category) __attribute__ ((format_arg (3)));
#endif
+/*
+ * LC_MESSAGES is only in POSIX, and hence missing on Windows. libintl
+ * fixes that for us, but if that isn't included then we need to sort it
+ * out ourselves.
+ */
+#if !defined ENABLE_NLS || !ENABLE_NLS
+#include <locale.h>
+#ifndef LC_MESSAGES
+#define LC_MESSAGES 1729
+#endif
+#endif
+
#include "gettext.h"
/* gettext breaks -Wformat (upstream bug 64384) */