From f611d1c357b76f3cd868b955142cdb6779400df7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 1 Jan 2018 17:38:04 +0100 Subject: [PATCH] * Compile C code with MSVC Makefile as C instead of C++ * Add compatibility tweak for MSVC in C mode for math functions --- Makefile.griffin | 4 ++-- libretro-common/include/compat/msvc.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.griffin b/Makefile.griffin index a284b2df89..182281628b 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -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 diff --git a/libretro-common/include/compat/msvc.h b/libretro-common/include/compat/msvc.h index 51752144fe..c233b08827 100644 --- a/libretro-common/include/compat/msvc.h +++ b/libretro-common/include/compat/msvc.h @@ -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".