Skip to content

Commit

Permalink
Make sure LC_MESSAGES is defined without ENABLE_NLS
Browse files Browse the repository at this point in the history
This is missing on Windows by default, and will cause the build to fail
if ENABLE_NLS is disabled.
  • Loading branch information
CendioOssman committed Nov 18, 2024
1 parent 3870536 commit 35f37ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vncviewer/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down

0 comments on commit 35f37ce

Please sign in to comment.