From 0c5f2b9409cbb2f554aa28cc011ecc637ccf9902 Mon Sep 17 00:00:00 2001 From: tqchen Date: Mon, 1 Sep 2014 17:15:04 -0700 Subject: [PATCH] gard GNU c --- Makefile | 2 +- src/utils/utils.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2fd881843..c7524747c 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/utils/utils.h b/src/utils/utils.h index 1214be861..49bd36819 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -10,8 +10,10 @@ #include #include #include -#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