* Compile C code with MSVC Makefile as C instead of C++

* Add compatibility tweak for MSVC in C mode for math functions
This commit is contained in:
twinaphex 2018-01-01 17:38:04 +01:00
parent 21c1acac73
commit f611d1c357
2 changed files with 3 additions and 3 deletions

View File

@ -832,7 +832,7 @@ ifeq ($(DEBUG), 1)
CFLAGS += -Wp64
endif
CFLAGS += -Od -Zi -D_DEBUG -MTd -TP
CFLAGS += -Od -Zi -D_DEBUG -MTd
LDFLAGS += -DEBUG
else
CFLAGS += -O0 -g -DDEBUG
@ -847,7 +847,7 @@ else ifneq (,$(findstring msvc,$(platform)))
LDFLAGS += -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup
endif
CFLAGS += -O2 -DNDEBUG -MT -TP
CFLAGS += -O2 -DNDEBUG -MT
else
CFLAGS += -O3
endif

View File

@ -92,7 +92,7 @@ typedef int ssize_t;
#define va_copy(x, y) ((x) = (y))
#endif
#if _MSC_VER <= 1200
#if _MSC_VER <= 1310
#ifndef __cplusplus
/* VC6 math.h doesn't define some functions when in C mode.
* Trying to define a prototype gives "undefined reference".