On 9/21/2014 06:58, lvqcl wrote:> Erik de Castro Lopo wrote: > >>> MSVS version of vsnprintf_s is located inside (statically linked) msvcp???.lib >>> or (dynamically linked) msvcp???.dll. They are part of MSVS runtime, and compatible >>> with WinXP. So it is safe to use it in FLAC. >> >> Oh, ok. I missed this bit. I know so very little about Windows. >> >> However, if you compile flac on say Win7 using vsnprintf_s and then take >> the dynamically compiled binary to WinXP it will fail, right? > > No, flac.exe compiled with MSVS 2013 (and dynamically linked with MSVC runtime) will > simply require msvcr120.dll to run. On both OSes. >You could just request mingw to include a vsnprintf_s implementation for XP and earlier, mingw-w64 has already done so. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140921/c6578921/attachment.pgp
JonY wrote:> You could just request mingw to include a vsnprintf_s implementation for > XP and earlier, mingw-w64 has already done so.I use MinGW-w64: it's XhmikosR's MSYS that contains "MinGW-w64 build of GCC/Binutils for Windows" from nevcairiel. It has mingw-w64 3.1.0 inside. But I thought that MinGW-w64 links with msvcrt.dll and uses vsnprintf_s from it. Are you sure that MinGW-w64 has its own independent implementation of vsnprintf_s?
On 9/21/2014 08:17, lvqcl wrote:> JonY wrote: > >> You could just request mingw to include a vsnprintf_s implementation for >> XP and earlier, mingw-w64 has already done so. > > I use MinGW-w64: it's XhmikosR's MSYS that contains > "MinGW-w64 build of GCC/Binutils for Windows" from nevcairiel. > It has mingw-w64 3.1.0 inside. > > But I thought that MinGW-w64 links with msvcrt.dll and > uses vsnprintf_s from it. Are you sure that MinGW-w64 > has its own independent implementation of vsnprintf_s?No, it falls back on an internal implementation if it isn't found in MSVCRT. And furthermore, I retract my statement after looking into the implementation, it is just calling vsprintf while disregarding the size. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140921/2b7193f3/attachment.pgp