Remove sprintf warnings on Windows and fix sprintf-related fails on Mac

This commit is contained in:
Dmitry Babokin
2013-04-24 22:36:48 +02:00
parent 65ac336211
commit e756daa261

View File

@@ -50,6 +50,16 @@
available to ispc programs at compile time automatically.
*/
#ifdef _MSC_VER
// We do want old school sprintf and don't want secure Microsoft extensions.
// And we also don't want warnings about it, so the define.
#define _CRT_SECURE_NO_WARNINGS
#else
// Some versions of glibc has "fortification" feature, which expands sprintf
// to __builtin___sprintf_chk(..., __builtin_object_size(...), ...).
// We don't want this kind of expansion, as we don't support these intrinsics.
#define _FORTIFY_SOURCE 0
#endif
#ifndef _MSC_VER
#include <unistd.h>