|
From: Allin C. <cot...@wf...> - 2017-09-29 19:16:53
|
On Fri, 29 Sep 2017, Hans-Bernhard Bröker wrote: > Am 28.09.2017 um 23:12 schrieb Allin Cottrell: >> Three of the source files in gnuplot's src/win32 use the function >> swprintf_s(), namely wgdiplus.cpp, wmenu.c and wtext.c. In one of these >> files, wgdiplus.cpp, there's a recognition that this function is not >> universally available: >> >> #ifdef __WATCOMC__ >> // swprintf_s is missing from <cwchar> >> # define swprintf_s(s, c, f, ...) swprintf(s, c, f, __VA_ARGS__) >> #endif >> >> It seems to me that this guard against use of an undefined function should >> also be present in wmenu.c and wtext.c > > It may seem like that at first glance, but it's not actually the case. > OpenWatcom does supply swprintf_s(), but only for C source code, not for C++. > I.e. it's in <wchar.h>, but not available via its C++ equivalent, <cwchar>. OK, I see. > . Moreover, it's not just >> the Watcom compiler that's affected: swprintf_s is not declared in the >> headers provided for cross-compilation via mingw64. > > I see no such problem here. Maybe your version of mingw64 is outdated? > > (For reference, I'm using the current version of the MinGW64 headers as > installed by Cygwin, from package mingw64-x86_64-headers-5.0.2-1). My headers are also version 5.0.2 but I guess something must be wrong with my setup; I'll investigate. Allin Cottrell |