Merge pull request #9938 from libretro-mirrors/master

Patches to make it possible to compile with mingw, pt. 1
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2017-08-29 22:10:47 +02:00
commit ee6086c0f6
5 files changed
+7 -8

No files matched your search

+4
View File
@@ -88,6 +88,10 @@ inline void AtomicStoreRelease(volatile T& dest, U value)
dest = (T)value; // 32-bit writes are always atomic
}
#ifdef __MINGW32__
void *_InterlockedExchangePointer_acq(void *volatile *, void volatile *);
#endif
template <typename T, typename U>
inline T* AtomicExchangeAcquire(T* volatile& loc, U newval)
{
-5
View File
@@ -62,11 +62,6 @@ private:
#elif defined(_WIN32)
// Check MSC ver
#if !defined _MSC_VER || _MSC_VER <= 1000
#error needs at least version 1000 of MSC
#endif
// Memory leak checks
#define CHECK_HEAP_INTEGRITY()
+1 -1
View File
@@ -77,7 +77,7 @@ ConsoleListener::~ConsoleListener()
Close();
}
#ifdef _WIN32
#if defined(_WIN32)
// Handle console event
bool WINAPI ConsoleHandler(DWORD msgType)
{
+1 -1
View File
@@ -25,7 +25,7 @@
#include "Common.h"
#ifdef _WIN32
#ifdef _MSC_VER
inline struct tm* localtime_r(const time_t *clock, struct tm *result) {
if (localtime_s(result, clock) == 0)
return result;
+1 -1
View File
@@ -33,7 +33,7 @@ extern bool MsgAlert(bool yes_no, int Style, const char* format, ...)
void SetEnableAlert(bool enable);
#ifndef GEKKO
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
#define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__)
#define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__)
#else