ref: 2c9f19474af5ee681dddcb88e02b14d5f9b283d8
parent: 7261cc4bc20d02a9bb2a875678bd789a044a7aaa
parent: ba38dc77a5995d43077f4699aae21ffd00494379
author: Ethan Hugg <[email protected]>
date: Fri Jan 10 09:21:33 EST 2014
Merge pull request #132 from mstorsjo/mingw64 Add support for building on 64 bit mingw
--- a/Makefile
+++ b/Makefile
@@ -29,11 +29,11 @@
ifeq ($(ENABLE64BIT), Yes)
CFLAGS += -m64
LDFLAGS += -m64
-ASMFLAGS += -DUNIX64
+ASMFLAGS_PLATFORM = -DUNIX64
else
CFLAGS += -m32
LDFLAGS += -m32
-ASMFLAGS += -DX86_32
+ASMFLAGS_PLATFORM = -DX86_32
endif
include build/platform-$(UNAME).mk
@@ -44,7 +44,7 @@
CFLAGS += -DNO_DYNAMIC_VP
LDFLAGS +=
-ASMFLAGS += -DNO_DYNAMIC_VP
+ASMFLAGS += $(ASMFLAGS_PLATFORM) -DNO_DYNAMIC_VP
#### No user-serviceable parts below this line
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -1,5 +1,14 @@
ASM = nasm
-CFLAGS += -DWIN32 -D__NO_CTYPE
+CFLAGS += -D__NO_CTYPE
LDFLAGS +=
+ifeq ($(ENABLE64BIT), Yes)
+ASMFLAGS += -f win64
+ASMFLAGS_PLATFORM = -DWIN64
+CFLAGS += -DWIN64
+CXX = x86_64-w64-mingw32-g++
+AR = x86_64-w64-mingw32-ar
+else
ASMFLAGS += -f win32 -DPREFIX
+CFLAGS += -DWIN32
+endif
--- a/codec/processing/src/common/typedef.h
+++ b/codec/processing/src/common/typedef.h
@@ -50,6 +50,12 @@
#define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP {
#define WELSVP_NAMESPACE_END }
+#ifdef _MSC_VER
+#include <stddef.h>
+#else
+#include <stdint.h>
+#endif
+
WELSVP_NAMESPACE_BEGIN
#if ( defined(_WIN32) || defined(_WIN32) ) && defined(_MSC_VER)
@@ -66,15 +72,6 @@
#else // GCC
-typedef signed char int8_t
-; // [comment]: some compilers may identify the type "char" as "unsigned char" as default, so declare it explicit
-typedef unsigned char uint8_t ;
-typedef signed short int16_t ;
-typedef unsigned short uint16_t ;
-typedef signed int int32_t ;
-typedef unsigned int uint32_t ;
-typedef long long int64_t ;
-typedef unsigned long long uint64_t ;
#define inline_t inline
#endif
--- a/codec/processing/src/common/util.h
+++ b/codec/processing/src/common/util.h
@@ -77,7 +77,7 @@
#define WELS_ALIGN4(iInput) ((iInput+3) & ~3)
#define WELS_ALIGN8(iInput) ((iInput+7) & ~7)
-#define WelsCastFromPointer(p) (reinterpret_cast<long_t>(p))
+#define WelsCastFromPointer(p) (reinterpret_cast<intptr_t>(p))
#define WelsStaticCast(type, p) (static_cast<type>(p))
#define WelsDynamicCast(type, p) (dynamic_cast<type>(p))