Skip to content
Snippets Groups Projects
Commit b1ac0e76 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Some fixups to allow mingw-w64 to be used where mingw32 is currently working.

parent c7a09e0f
No related branches found
No related tags found
No related merge requests found
Pipeline #5876 failed
...@@ -216,9 +216,13 @@ endif ...@@ -216,9 +216,13 @@ endif
BUILDPATH ?= $(BUILD) BUILDPATH ?= $(BUILD)
gcc_machine := $(findstring mingw32,$(shell ${CC} -dumpmachine)) gcc_machine := $(findstring mingw32,$(shell ${CC} -dumpmachine))
gcc_w64 := $(findstring w64,$(shell ${CC} -dumpmachine))
ifeq ($(gcc_machine),mingw32) ifeq ($(gcc_machine),mingw32)
os := Win32 os := Win32
CFLAGS += -DMSVCRT_VERSION=0x0800 -m32 CFLAGS += -DMSVCRT_VERSION=0x0800 -m32 -DDISABLE_MKSTEMP_DEFINE
ifeq ($(gcc_w64),w64)
CFLAGS += -DDISABLE_MKSTEMP_DEFINE
endif
LDFLAGS+= -m32 LDFLAGS+= -m32
WINDRESFLAGS+= -Fpe-i386 WINDRESFLAGS+= -Fpe-i386
endif endif
......
...@@ -671,6 +671,8 @@ long xp_random(int n) ...@@ -671,6 +671,8 @@ long xp_random(int n)
/* There may be a native GNU C Library function to this... */ /* There may be a native GNU C Library function to this... */
/****************************************************************************/ /****************************************************************************/
#if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__) #if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
#ifdef __GNUC__
#if (__GNUC__ < 5)
char* ultoa(ulong val, char* str, int radix) char* ultoa(ulong val, char* str, int radix)
{ {
switch(radix) { switch(radix) {
...@@ -728,6 +730,8 @@ char* _ui64toa(uint64_t val, char* str, int radix) ...@@ -728,6 +730,8 @@ char* _ui64toa(uint64_t val, char* str, int radix)
return str; return str;
} }
#endif #endif
#endif
#endif
/****************************************************************************/ /****************************************************************************/
/* Write the version details of the current operating system into str */ /* Write the version details of the current operating system into str */
......
...@@ -232,10 +232,14 @@ extern "C" { ...@@ -232,10 +232,14 @@ extern "C" {
#endif #endif
#if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__) #if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
#ifdef __GNUC__
#if (__GNUC__ < 5)
DLLEXPORT char* ultoa(ulong, char*, int radix); DLLEXPORT char* ultoa(ulong, char*, int radix);
DLLEXPORT char* _i64toa(int64_t, char*, int radix); DLLEXPORT char* _i64toa(int64_t, char*, int radix);
DLLEXPORT char* _ui64toa(uint64_t, char*, int radix); DLLEXPORT char* _ui64toa(uint64_t, char*, int radix);
#endif #endif
#endif
#endif
#if defined(__unix__) #if defined(__unix__)
DLLEXPORT char* strupr(char* str); DLLEXPORT char* strupr(char* str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment