On Fri, 2015-05-15 at 00:43 +1000, Shaddy Baddah wrote: > Hi, > > I've been trying to use mingw-64 to build the eclipse native launcher > (.exe). > > I encountered an issue around the indirect (via preprocessor defines) of > swprintf. > > The eclipse code usage of swprintf suggested that the declaration should > match this (from > https://msdn.microsoft.com/en-us/library/aa272937%28v=vs.60%29.aspx): > > int swprintf( wchar_t *buffer, const wchar_t *format [, argument] ... ); > > However, the declaration in mingw-w64-headers/crt/swprintf.inl, at least > outside the C++ scope, it is defined with the extra size_t __count > argument: > > int swprintf (wchar_t *__stream, size_t __count, const wchar_t > *__format, ...) > > I mention the C++ scope, because the declaration in the same > swprintf.inl file seems to conflict with the one above it (and match > that of the MSDN link): > > #ifdef __cplusplus > > extern "C++" { > > ... > int swprintf (wchar_t *__stream, const wchar_t *__format, ...) > > So my first confusion is the mismatch in the same file. > > The second is, I've also seen an article which shows the second, > problematic (for the eclipse build) form: > > https://msdn.microsoft.com/en-us/library/ybk95axf.aspx > > The third confusion is that I've already seen that mingw-64 developers > seemingly rejected the first form I've specified. That's what I gather > from the rejection of this bug: > > http://sourceforge.net/p/mingw-w64/bugs/332/ > > and another bit of discussion I can no longer bring up. > > I've thrown a bit out there. So first thing is, it is not a > bug/incorrect for the two different declarations to be in swprint.inl? > > Is the eclipse code wrong to use the first form, over the second? The > code is C and not C++. >
It looks like the first version should be swprintf_s https://msdn.microsoft.com/en-us/library/ce3zzk1k.aspx ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
