diff --git a/core/build.h b/core/build.h
index f39a3035f..88404e667 100755
--- a/core/build.h
+++ b/core/build.h
@@ -153,12 +153,6 @@
#define CPU_ARM64 0x20000008
#define CPU_MIPS64 0x20000009
-//BUILD_COMPILER
-#define COMPILER_VC 0x30000001
-#define COMPILER_GCC 0x30000002
-#define COMPILER_CLANG 0x30000003
-#define COMPILER_INTEL 0x30000004
-
//FEAT_SHREC, FEAT_AREC, FEAT_DSPREC
#define DYNAREC_NONE 0x40000001
#define DYNAREC_JIT 0x40000002
@@ -177,12 +171,6 @@
#endif
#endif
-#ifdef __GNUC__
- #define BUILD_COMPILER COMPILER_GCC
-#else
- #define BUILD_COMPILER COMPILER_VC
-#endif
-
//Targets
#if defined(TARGET_WIN86)
#define HOST_OS OS_WINDOWS
@@ -301,8 +289,6 @@
// Compiler Related
-#define COMPILER_VC_OR_CLANG_WIN32 ((BUILD_COMPILER == COMPILER_VC) || (BUILD_COMPILER == COMPILER_CLANG) && HOST_OS == OS_WINDOWS)
-
#ifndef _MSC_VER
#define ATTR_USED __attribute__((used))
#define ATTR_UNUSED __attribute__((used))
diff --git a/core/cfg/cfg.cpp b/core/cfg/cfg.cpp
index db67b382e..4634a7575 100644
--- a/core/cfg/cfg.cpp
+++ b/core/cfg/cfg.cpp
@@ -4,8 +4,6 @@
Works surprisingly well considering how old it is ...
*/
-#define _CRT_SECURE_NO_DEPRECATE (1)
-
#include "cfg.h"
#include "ini.h"
#include "stdclass.h"
diff --git a/core/hw/modem/dns.cpp b/core/hw/modem/dns.cpp
index acd09e650..5e264d7e5 100644
--- a/core/hw/modem/dns.cpp
+++ b/core/hw/modem/dns.cpp
@@ -18,15 +18,14 @@
You should have received a copy of the GNU General Public License
along with reicast. If not, see .
*/
-#include "types.h"
+#if !defined(_MSC_VER)
-#if !defined(_MSC_VER) && (BUILD_COMPILER!=COMPILER_CLANG || !defined(WIN32))
+#include "types.h"
+#include "network/net_platform.h"
#include
#include
-#include "network/net_platform.h"
-
extern "C" {
#include
#include
@@ -150,4 +149,4 @@ char *read_name(char *reader, char *buffer, int *count)
return name;
}
-#endif // !COMPILER_VC_OR_CLANG_WIN32
+#endif
diff --git a/core/nullDC.cpp b/core/nullDC.cpp
index cec35da65..7ee95b6dd 100755
--- a/core/nullDC.cpp
+++ b/core/nullDC.cpp
@@ -55,10 +55,6 @@ cThread emu_thread(&dc_run, NULL);
static std::future loading_done;
std::atomic loading_canceled;
-#ifdef _WIN32
-#include
-#endif
-
static s32 plugins_Init()
{
diff --git a/core/stdclass.cpp b/core/stdclass.cpp
index 6cc1d0824..eadbf4be6 100644
--- a/core/stdclass.cpp
+++ b/core/stdclass.cpp
@@ -12,12 +12,15 @@
#include
#endif
-#if COMPILER_VC_OR_CLANG_WIN32
+#ifdef _WIN32
#include
#include
#include
#define access _access
- #define R_OK 4
+ #ifndef R_OK
+ #define R_OK 4
+ #endif
+ #define mkdir(dir, mode) _mkdir(dir)
#else
#include
#endif
@@ -147,15 +150,7 @@ std::string get_game_dir()
bool make_directory(const std::string& path)
{
-#if COMPILER_VC_OR_CLANG_WIN32
-#define mkdir _mkdir
-#endif
-
-#ifdef _WIN32
- return mkdir(path.c_str()) == 0;
-#else
return mkdir(path.c_str(), 0755) == 0;
-#endif
}
void cThread::Start()
diff --git a/core/types.h b/core/types.h
index dedc44ec7..bb3495d99 100644
--- a/core/types.h
+++ b/core/types.h
@@ -24,48 +24,6 @@
#define DYNACALL
#endif
-#ifdef _MSC_VER
-#ifdef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
-#undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
-#endif
-
-#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
-
-#ifdef _CRT_SECURE_NO_DEPRECATE
-#undef _CRT_SECURE_NO_DEPRECATE
-#endif
-
-#define _CRT_SECURE_NO_DEPRECATE
-//unnamed struncts/unions
-#pragma warning( disable : 4201)
-
-//unused parameters
-#pragma warning( disable : 4100)
-
-//SHUT UP M$ COMPILER !@#!@$#
-#ifdef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
-#undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
-#endif
-
-#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
-
-#ifdef _CRT_SECURE_NO_DEPRECATE
-#undef _CRT_SECURE_NO_DEPRECATE
-#endif
-#define _CRT_SECURE_NO_DEPRECATE
-
-#define NOMINMAX
-
-//Do not complain when i use enum::member
-#pragma warning( disable : 4482)
-
-//unnamed struncts/unions
-#pragma warning( disable : 4201)
-
-//unused parameters
-#pragma warning( disable : 4100)
-#endif
-
#include
#include
#include
@@ -300,10 +258,7 @@ bool dc_unserialize(void **data, unsigned int *total_size);
#define REICAST_SA(v_arr,num) rc_serialize((v_arr), sizeof((v_arr)[0])*(num), data, total_size)
#define REICAST_USA(v_arr,num) rc_unserialize((v_arr), sizeof((v_arr)[0])*(num), data, total_size)
-
-#if COMPILER_VC_OR_CLANG_WIN32
-#pragma warning( disable : 4127 4996 /*4244*/)
-#else
+#ifndef _MSC_VER
#define stricmp strcasecmp
#endif
diff --git a/core/windows/win_vmem.cpp b/core/windows/win_vmem.cpp
index e7938b24d..da8d1ba71 100644
--- a/core/windows/win_vmem.cpp
+++ b/core/windows/win_vmem.cpp
@@ -1,11 +1,8 @@
-
-#define _WIN32_WINNT 0x0500
-#include
-#include
-
#include "hw/mem/_vmem.h"
#include "hw/sh4/sh4_if.h"
+#include
+
// Implementation of the vmem related function for Windows platforms.
// For now this probably does some assumptions on the CPU/platform.
diff --git a/core/windows/winmain.cpp b/core/windows/winmain.cpp
index 6ebef899e..b2ec5ecf0 100644
--- a/core/windows/winmain.cpp
+++ b/core/windows/winmain.cpp
@@ -15,13 +15,9 @@
#include "hw/maple/maple_devs.h"
#include "emulator.h"
-#define _WIN32_WINNT 0x0500
#include
#include
-#include
-#pragma comment(lib, "XInput9_1_0.lib")
-
PCHAR*
CommandLineToArgvA(
PCHAR CmdLine,