gard GNU c

This commit is contained in:
tqchen 2014-09-01 17:15:04 -07:00
parent 2f6a64e8fa
commit 0c5f2b9409
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export CC = gcc
export CXX = g++
export CXX = clang++
export LDFLAGS= -pthread -lm
export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas -fPIC -pedantic -ansi

View File

@ -10,8 +10,10 @@
#include <cstdarg>
#include <string>
#include <cstdlib>
#ifdef _MSC_VER
#if !defined(__GNUC__)
#define fopen64 fopen
#endif
#ifdef _MSC_VER
// NOTE: sprintf_s is not equivalent to snprintf,
// they are equivalent when success, which is sufficient for our case
#define snprintf sprintf_s