Remove support for mingw
MSVC works fine and the bundled mingw libraries are outdated.
This commit is contained in:
@@ -12,7 +12,7 @@ extern "C" {
|
||||
#include "jerror.h"
|
||||
}
|
||||
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
#if defined(WIN32)
|
||||
// work around namespace bugs in win32/libjpeg:
|
||||
#define XMD_H
|
||||
#undef FAR
|
||||
|
||||
@@ -55,7 +55,6 @@ void PNG_Error( png_struct *png, const char *error )
|
||||
|
||||
void PNG_Warning( png_struct *png, const char *warning )
|
||||
{
|
||||
// FIXME: Mismatched libpng headers vs. library causes a segfault here on MinGW
|
||||
CHECKPOINT_M(ssprintf("PNG warning during processing: %s", warning));
|
||||
error_info *info = (error_info *) png_get_io_ptr(png);
|
||||
LOG->Trace( "loading \"%s\": warning: %s", info->fn, warning );
|
||||
|
||||
@@ -244,7 +244,7 @@ MutexImpl *MakeMutex( RageMutex *pParent )
|
||||
#if defined(UNIX)
|
||||
#include <dlfcn.h>
|
||||
#include "arch/ArchHooks/ArchHooks_Unix.h"
|
||||
#endif // On MinGW clockid_t is defined in pthread.h
|
||||
#endif
|
||||
namespace
|
||||
{
|
||||
typedef int (* CONDATTR_SET_CLOCK)( pthread_condattr_t *attr, clockid_t clock_id );
|
||||
|
||||
@@ -571,15 +571,6 @@ static void NORETURN debug_crash()
|
||||
__asm mov eax,dword ptr [ebx]
|
||||
// __asm mov dword ptr [ebx],eax
|
||||
// __asm lock add dword ptr cs:[00000000h], 12345678h
|
||||
#elif defined(__GNUC__)
|
||||
// HACK: I don't know a lick of ASM and don't know how to port this to
|
||||
// the AT&T syntax gas uses. So we temporarily change it.
|
||||
asm(".intel_syntax noprefix\n\t"
|
||||
"xor ebx,ebx\n\t"
|
||||
"mov eax,dword ptr [ebx]\n\t"
|
||||
// "mov dword ptr [ebx],eax"
|
||||
// "lock add dword ptr cs:[00000000h], 12345678h"
|
||||
".att_syntax noprefix\n\t");
|
||||
#endif
|
||||
// } __except( CrashHandler::ExceptionHandler((EXCEPTION_POINTERS*)_exception_info()) ) {
|
||||
// }
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
#define SUPPORT_D3D
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#if !defined(_WINDOWS)
|
||||
#define _WINDOWS // This isn't defined under all versions of MinGW
|
||||
#endif
|
||||
#define NEED_CSTDLIB_WORKAROUND // Needed for llabs() in MinGW
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#if _MSC_VER == 1400 // VC8 specific warnings
|
||||
@@ -90,7 +83,6 @@ void my_usleep( unsigned long usec );
|
||||
#endif
|
||||
|
||||
// Missing stdint types:
|
||||
#if !defined(__MINGW32__) // MinGW headers define these for us
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef int int32_t;
|
||||
@@ -116,7 +108,6 @@ typedef unsigned __int64 uint64_t;
|
||||
int64_t llabs( int64_t i ) { return i >= 0 ? i : -i; }
|
||||
#endif // #if _MSC_VER < 1400
|
||||
#endif // #if defined(_MSC_VER)
|
||||
#endif // #if !defined(__MINGW32__)
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
@@ -128,53 +119,10 @@ int64_t llabs( int64_t i ) { return i >= 0 ? i : -i; }
|
||||
#define CRASH_HANDLER
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) // It might be MinGW or Cygwin(?)
|
||||
#include "archutils/Common/gcc_byte_swaps.h"
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1310) // Byte swap functions were first implemented in Visual Studio .NET 2003
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1310) // Byte swap functions were first implemented in Visual Studio .NET 2003
|
||||
#define ArchSwap32(n) _byteswap_ulong(n)
|
||||
#define ArchSwap24(n) _byteswap_ulong(n) >> 8
|
||||
#define ArchSwap16(n) _byteswap_ushort(n)
|
||||
#else
|
||||
#define HAVE_BYTE_SWAPS
|
||||
|
||||
inline uint32_t ArchSwap32( uint32_t n )
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, n
|
||||
xchg al, ah
|
||||
ror eax, 16
|
||||
xchg al, ah
|
||||
mov n, eax
|
||||
};
|
||||
return n;
|
||||
}
|
||||
|
||||
inline uint32_t ArchSwap24( uint32_t n )
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, n
|
||||
xchg al, ah
|
||||
ror eax, 16
|
||||
xchg al, ah
|
||||
ror eax, 8
|
||||
mov n, eax
|
||||
};
|
||||
return n;
|
||||
}
|
||||
|
||||
inline uint16_t ArchSwap16( uint16_t n )
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov ax, n
|
||||
xchg al, ah
|
||||
mov n, ax
|
||||
};
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -130,27 +130,9 @@ typedef std::make_signed<size_t>::type ssize_t;
|
||||
/* Defined to 1 if the underlying system uses big endian. */
|
||||
#cmakedefine ENDIAN_BIG 1
|
||||
|
||||
/* Defined to 1 if building on a windows system, and thus uses the windows loading window. */
|
||||
#cmakedefine NEED_WINDOWS_LOADING_WINDOW 1
|
||||
|
||||
/* Defined to 1 if logging timing segment additions and removals. */
|
||||
#cmakedefine WITH_LOGGING_TIMING_DATA 1
|
||||
|
||||
/* Defined to 1 if the PBS_MARQUEE symbol was found. */
|
||||
#cmakedefine HAVE_PBS_MARQUEE 1
|
||||
|
||||
/* Defined to 1 if the PBM_SETMARQUEE symbol was found. */
|
||||
#cmakedefine HAVE_PBM_SETMARQUEE 1
|
||||
|
||||
#if defined(NEED_WINDOWS_LOADING_WINDOW)
|
||||
#if !defined(HAVE_PBS_MARQUEE)
|
||||
#define PBS_MARQUEE 0x08
|
||||
#endif
|
||||
#if !defined(HAVE_PBM_SETMARQUEE)
|
||||
#define PBM_SETMARQUEE (WM_USER+10)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
/** @brief Define a macro to tell the compiler that a function has printf()
|
||||
* semantics, to aid warning output. */
|
||||
@@ -191,9 +173,6 @@ typedef std::make_signed<size_t>::type ssize_t;
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#define mkdir(path, mode) mkdir(path)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -51,8 +51,6 @@ void NORETURN sm_crash( const char *reason )
|
||||
* way, this function will appear in backtrace stack traces. */
|
||||
#if defined(_MSC_VER)
|
||||
__nop();
|
||||
#elif defined(__GNUC__) // MinGW or similar
|
||||
asm("nop");
|
||||
#endif
|
||||
#else
|
||||
_exit( 1 );
|
||||
|
||||
@@ -46,10 +46,6 @@
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#if defined(NEED_CSTDLIB_WORKAROUND)
|
||||
#define llabs ::llabs
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifdef ASSERT
|
||||
|
||||
Reference in New Issue
Block a user