From 35f37ce7ee40aee2f8a8fcf13dee598a3e8020e7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 18 Nov 2024 16:42:14 +0100 Subject: [PATCH] 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. --- vncviewer/i18n.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 +#ifndef LC_MESSAGES +#define LC_MESSAGES 1729 +#endif +#endif + #include "gettext.h" /* gettext breaks -Wformat (upstream bug 64384) */ -- 2.39.5