]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix link error on MSVC with --disable-shared.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jan 2020 19:19:17 +0000 (20:19 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:39:01 +0000 (13:39 +0200)
* gettext-tools/tests/setlocale.c (setlocale): Define to fake_setlocale on
native Windows.
* gettext-tools/tests/format-c-3-prg.c (setlocale): Likewise.
* gettext-tools/tests/format-c-4-prg.c (setlocale): Likewise.
* gettext-tools/tests/plural-1-prg.c (setlocale): Likewise.
* gettext-tools/tests/tstgettext.c (setlocale): Likewise.
* gettext-tools/tests/tstngettext.c (setlocale): Likewise.

gettext-tools/tests/format-c-3-prg.c
gettext-tools/tests/format-c-4-prg.c
gettext-tools/tests/plural-1-prg.c
gettext-tools/tests/setlocale.c
gettext-tools/tests/tstgettext.c
gettext-tools/tests/tstngettext.c

index 3e085bc030215f9a2be547fb623f8331355b12b3..f26e7a5cdfda8afd88d0c39cb17a599c1c4fae1a 100644 (file)
@@ -40,6 +40,9 @@
    and Windows.  This test relies on the fake setlocale function in
    setlocale.c.  */
 #undef setlocale
+#if defined _WIN32 && !defined __CYGWIN__
+# define setlocale fake_setlocale
+#endif
 
 #define _(string) gettext (string)
 
index 05b61bb7ea2efa696137123012cd941ebb8a4a66..5160ff6ef8d88bb73f93ad77042a4b61f4b245d6 100644 (file)
@@ -40,6 +40,9 @@
    and Windows.  This test relies on the fake setlocale function in
    setlocale.c.  */
 #undef setlocale
+#if defined _WIN32 && !defined __CYGWIN__
+# define setlocale fake_setlocale
+#endif
 
 #define _(string) gettext (string)
 
index e994953e0faf023738ffe75e1de2d1323af4422f..e681595b5be3db64247eebae6b8729ba28ef4587 100644 (file)
@@ -36,6 +36,9 @@
    and Windows.  This test relies on the fake setlocale function in
    setlocale.c.  */
 #undef setlocale
+#if defined _WIN32 && !defined __CYGWIN__
+# define setlocale fake_setlocale
+#endif
 
 int
 main (int argc, char *argv[])
index c9ce44c5cac7bcb214b8681633e719f4583b5070..e69a694561f9fb0b9e801b78ed9ea0f6bb2d5786 100644 (file)
    Note: On platforms where _nl_locale_name_posix invokes setlocale_null, this
    override *must* be called 'setlocale'.  */
 #undef setlocale
+/* Avoid a link error on MSVC.  */
+#if defined _WIN32 && !defined __CYGWIN__
+# define setlocale fake_setlocale
+#endif
 
 /* Return string representation of locale CATEGORY.  */
 static const char *
index 52ba1cea9c50fc733274976b8524005a487854de..d3f44ff9c92a29486888083db3a8db8eca73fa8b 100644 (file)
 #undef _LIBINTL_H
 #include "libgnuintl.h"
 
+#if defined _WIN32 && !defined __CYGWIN__
+# undef setlocale
+# define setlocale fake_setlocale
+#endif
+
 #define _(str) gettext (str)
 
 /* If false, add newline after last string.  This makes only sense in
index aa7cf70ed7183d2594ce859fe33fd5741f1abe7d..42865aee7893d8289963fb0a9cf341da9e0f2361 100644 (file)
 #undef _LIBINTL_H
 #include "libgnuintl.h"
 
+#if defined _WIN32 && !defined __CYGWIN__
+# undef setlocale
+# define setlocale fake_setlocale
+#endif
+
 #define _(str) gettext (str)
 
 /* Long options.  */