]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Avoid trouble on mingw caused by mingw's *printf functions.
authorBruno Haible <bruno@clisp.org>
Sat, 18 May 2019 16:01:31 +0000 (18:01 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 10:48:16 +0000 (12:48 +0200)
Reported by Michele Locati <michele@locati.it>
in <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00103.html>.

* gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Define __USE_MINGW_ANSI_STDIO
to 0.
* gettext-runtime/libasprintf/Makefile.am (DEFS): Likewise.
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Likewise.

gettext-runtime/intl/Makefile.am
gettext-runtime/libasprintf/Makefile.am
libtextstyle/lib/Makefile.am

index 4c11c9fca6a3bada7e23d0ed30df050d8a05b6a8..c45f6d8fde84ba5d2ac2454b4d46e7721f92ebd5 100644 (file)
@@ -52,6 +52,15 @@ AM_CPPFLAGS = \
   -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
   -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL
 
+if WOE32
+# On mingw, disable the declarations of *printf functions as aliases to the
+# corresponding __mingw_*printf functions, because
+# - these functions are useless for i18n purposes (not POSIX/XSI compliant),
+# - they pull in a dependency to the libgcc_s_sjlj DLL (through the symbols
+#   __udivdi3, __umoddi3).
+AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO=0
+endif
+
 # Parametrization of the 'relocatable-lib-lgpl' module.
 AM_CPPFLAGS += \
   -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
index 4189ef1a1ac670fd5661b9c2442cf60cf3f8bbea..be78f68356b33c0e11ed64c5576a1d9b6b9504ba 100644 (file)
@@ -26,6 +26,15 @@ RM = rm -f
 
 DEFS = -DIN_LIBASPRINTF @DEFS@
 
+if WOE32
+# On mingw, disable the declarations of *printf functions as aliases to the
+# corresponding __mingw_*printf functions, because
+# - these functions are useless for i18n purposes (not POSIX/XSI compliant),
+# - they pull in a dependency to the libgcc_s_sjlj DLL (through the symbols
+#   __udivdi3, __umoddi3).
+DEFS += -D__USE_MINGW_ANSI_STDIO=0
+endif
+
 
 # Library include file.
 
index 9f2cb0e17262bce9f5feaadcaa1b45327b46ee53..32b1a7c4f70c7988c02a457f1b379335732d4818 100644 (file)
@@ -48,6 +48,13 @@ if INCLUDED_LIBXML
 AM_CPPFLAGS += -DLIBXML_STATIC
 endif
 
+if WOE32
+# On mingw, disable the declarations of *printf functions as aliases to the
+# corresponding __mingw_*printf functions, because they pull in a dependency
+# to the libgcc_s_sjlj DLL (through the symbols __udivdi3, __umoddi3).
+AM_CPPFLAGS += -D__USE_MINGW_ANSI_STDIO=0
+endif
+
 # Rules generated and collected by gnulib-tool.
 include Makefile.gnulib