|
From: Hans-Bernhard B. <HBB...@t-...> - 2017-09-29 13:05:48
|
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>. . 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). |