Discussion:
CVS build issue
Allin Cottrell
2017-03-28 16:24:34 UTC
Permalink
Cross-building current CVS gnuplot with mingw-w64 (gcc-5.4.0) I'm
getting an error from wgdiplus.cpp, namely that swprintf_s is
undefined.

I notice that on lines 42-45 there's a mechanism to handle this for
the Watcom compiler:

#ifdef __WATCOMC__
// swprintf_s is missing from <cwchar>
# define swprintf_s(s, c, f, ...) swprintf(s, c, f, __VA_ARGS__)
#endif

so I would suggest this might be extended:

#if defined(__WATCOMC__) || defined(__MINGW64__)
// swprintf_s is missing from <cwchar>
# define swprintf_s(s, c, f, ...) swprintf(s, c, f, __VA_ARGS__)
#endif

(though maybe there's a more robust fix).
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
Loading...