]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix link error for tstgettext.exe on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 3 Jul 2022 14:21:52 +0000 (16:21 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 3 Jul 2022 14:21:52 +0000 (16:21 +0200)
* gettext-runtime/intl/export.h: Treat mingw like MSVC. In static builds. don't
use __declspec(dllexport). In shared builds, use also __declspec(dllimport).

gettext-runtime/intl/export.h

index 10253e338b719604d965c079679b3151b56047fc..915256df26f4bf5e737390b93b6ddcf761e5ec03 100644 (file)
@@ -1,8 +1,10 @@
 
 #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL
 #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default")))
-#elif defined _MSC_VER && BUILDING_LIBINTL
+#elif (defined _WIN32 && !defined __CYGWIN__) && defined WOE32DLL && BUILDING_LIBINTL
 #define LIBINTL_DLL_EXPORTED __declspec(dllexport)
+#elif (defined _WIN32 && !defined __CYGWIN__) && defined WOE32DLL
+#define LIBINTL_DLL_EXPORTED __declspec(dllimport)
 #else
 #define LIBINTL_DLL_EXPORTED
 #endif