Hi,
One of our users tried to run a Qt5 based application on Windows XP and
Windows Server 2003, but stumbled across a fatal error indicating that
the symbol vsprintf_s isn't available in msvcrt.dll [1].
After searching I've found out that the msvcrt.def.in still contains a
reference to vsprintf_s even though there's a wrapper implementation of
this symbol in mingw-w64-crt/secapi/vsprintf_s.c so it shouldn't be
mentioned in the msvcrt.def.in file any more.
After testing some more (see testcase at [2]) I also discovered some
other issues with the secapi wrappers. The attached patches should fix
these.
Regards,
Erik van Pienbroek
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1054481
[2]:
http://svn.nntpgrab.nl/svn/fedora_mingw_testsuite/trunk/testcases/def/secapi/
>From ec2ee6e10e3bcdf00c2e93eed427cc8c2b626cac Mon Sep 17 00:00:00 2001
From: Erik van Pienbroek <epien...@fedoraproject.org>
Date: Sun, 19 Jan 2014 17:11:40 +0100
Subject: [PATCH 1/2] Add _gmtime32 and _localtime32 to lib64/msvcrt.def
These symbols are required by the secapi wrappers
_gmtime32_s and _localtime32_s
---
mingw-w64-crt/lib64/msvcrt.def.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mingw-w64-crt/lib64/msvcrt.def.in b/mingw-w64-crt/lib64/msvcrt.def.in
index ed81eff..a0d3647 100644
--- a/mingw-w64-crt/lib64/msvcrt.def.in
+++ b/mingw-w64-crt/lib64/msvcrt.def.in
@@ -356,6 +356,7 @@ _getw
_getwch
_getwche
_getws
+_gmtime32
; _gmtime32_s replaced by emu
_gmtime64
; _gmtime64_s replaced by emu
@@ -471,6 +472,7 @@ _lfind
_loaddll
_lfind_s
_local_unwind
+_localtime32
; _localtime32_s replaced by emu
_localtime64
; _localtime64_s replaced by emu
--
1.8.4.2
>From 2dac1e1583fa2d0f142a048e275845e829883777 Mon Sep 17 00:00:00 2001
From: Erik van Pienbroek <epien...@fedoraproject.org>
Date: Sun, 19 Jan 2014 17:28:12 +0100
Subject: [PATCH 2/2] Remove rand_s and vsprintf_s from msvcrt.def.in
These symbols are implemented in the secapi wrappers so they
shouldn't be part of the msvcrt.def.in files any more
---
mingw-w64-crt/lib32/msvcrt.def.in | 2 +-
mingw-w64-crt/lib64/msvcrt.def.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcrt.def.in b/mingw-w64-crt/lib32/msvcrt.def.in
index 6c2c3cf..3455447 100644
--- a/mingw-w64-crt/lib32/msvcrt.def.in
+++ b/mingw-w64-crt/lib32/msvcrt.def.in
@@ -1218,7 +1218,7 @@ vsnprintf == _vsnprintf
snprintf == _snprintf
snwprintf == _snwprintf
vsnwprintf == _vsnwprintf
-vsprintf_s
+; vsprintf_s replaced by emu
vswprintf_s
vwprintf_s
wcrtomb_s
diff --git a/mingw-w64-crt/lib64/msvcrt.def.in b/mingw-w64-crt/lib64/msvcrt.def.in
index a0d3647..ceff01e 100644
--- a/mingw-w64-crt/lib64/msvcrt.def.in
+++ b/mingw-w64-crt/lib64/msvcrt.def.in
@@ -1160,7 +1160,7 @@ qsort
qsort_s
raise
rand
-rand_s
+; rand_s replaced by emu
realloc
remove
rename
@@ -1239,7 +1239,7 @@ vprintf_s
vsnprintf == _vsnprintf
snprintf == _snprintf
vsprintf
-vsprintf_s
+; vsprintf_s replaced by emu
vswprintf
vswprintf_s
vwprintf
--
1.8.4.2
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public