Browse Source

Add Windows _snprintf() workaround for duk cmdline

pull/431/head
Sami Vaarala 9 years ago
parent
commit
8766f94a96
  1. 9
      examples/cmdline/duk_cmdline.c

9
examples/cmdline/duk_cmdline.c

@ -18,6 +18,15 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#if defined(_MSC_VER)
/* Workaround for snprintf() missing in older MSVC versions.
* Note that _snprintf() may not NUL terminate the string, but
* this difference does not matter here as a NUL terminator is
* always explicitly added.
*/
#define snprintf _snprintf
#endif
#define GREET_CODE(variant) \
"print('((o) Duktape" variant " ' + " \
"Math.floor(Duktape.version / 10000) + '.' + " \

Loading…
Cancel
Save