|
From: Allin C. <cot...@wf...> - 2017-09-28 21:44:30
|
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. 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. Hence, a request: could this back-up definition be provided in all the affected files, and could it please be extended from __WATCOM__ to some convenient symbol that could be defined on the compiler command line for any system that's missing the definition -- for example something like: #if defined(__WATCOM__) || defined(SWPRINTF_S_MISSING) <alternative definition> #endif That way, one would not have to hack these three files to get current wgnuplot.exe to build. Thanks. -- Allin Cottrell Department of Economics Wake Forest University |