diff options
Diffstat (limited to 'emulators/mame/files')
18 files changed, 294 insertions, 258 deletions
diff --git a/emulators/mame/files/patch-3rdparty_bgfx_include_bgfxplatform.h b/emulators/mame/files/patch-3rdparty_bgfx_include_bgfxplatform.h deleted file mode 100644 index f93e002d243f..000000000000 --- a/emulators/mame/files/patch-3rdparty_bgfx_include_bgfxplatform.h +++ /dev/null @@ -1,13 +0,0 @@ -Catch up with https://hg.libsdl.org/SDL/rev/d11daa346140 - ---- 3rdparty/bgfx/include/bgfxplatform.h.orig 2015-09-30 06:29:01 UTC -+++ 3rdparty/bgfx/include/bgfxplatform.h -@@ -186,7 +186,7 @@ namespace bgfx - - #endif // BX_PLATFORM_ - --#if defined(_SDL_syswm_h) -+#if defined(_SDL_syswm_h) || defined(SDL_syswm_h_) - // If SDL_syswm.h is included before bgfxplatform.h we can enable SDL window - // interop convenience code. - diff --git a/emulators/mame/files/patch-3rdparty_bx_include_bx_float4__t.h b/emulators/mame/files/patch-3rdparty_bx_include_bx_float4__t.h deleted file mode 100644 index 6ffbf4a85868..000000000000 --- a/emulators/mame/files/patch-3rdparty_bx_include_bx_float4__t.h +++ /dev/null @@ -1,12 +0,0 @@ ---- 3rdparty/bx/include/bx/float4_t.h.orig 2015-09-30 06:29:01 UTC -+++ 3rdparty/bx/include/bx/float4_t.h -@@ -18,7 +18,8 @@ - #elif BX_COMPILER_CLANG \ - && !BX_PLATFORM_EMSCRIPTEN \ - && !BX_PLATFORM_IOS \ -- && BX_CLANG_HAS_EXTENSION(attribute_ext_vector_type) -+ && BX_CLANG_HAS_EXTENSION(attribute_ext_vector_type) \ -+ && !BX_PLATFORM_FREEBSD - # include "float4_langext.h" - #else - # ifndef BX_FLOAT4_WARN_REFERENCE_IMPL diff --git a/emulators/mame/files/patch-3rdparty_bx_include_bx_platform.h b/emulators/mame/files/patch-3rdparty_bx_include_bx_platform.h index 3b6d79890a5d..298754d7eef5 100644 --- a/emulators/mame/files/patch-3rdparty_bx_include_bx_platform.h +++ b/emulators/mame/files/patch-3rdparty_bx_include_bx_platform.h @@ -1,11 +1,39 @@ ---- 3rdparty/bx/include/bx/platform.h.orig 2015-04-29 06:18:54 UTC +--- 3rdparty/bx/include/bx/platform.h.orig 2018-02-27 15:59:06 UTC +++ 3rdparty/bx/include/bx/platform.h -@@ -184,7 +184,7 @@ - #elif defined(__QNX__) - # undef BX_PLATFORM_QNX - # define BX_PLATFORM_QNX 1 --#elif defined(__FreeBSD__) -+#elif defined(__FreeBSD__) || defined(__DragonFly__) - # undef BX_PLATFORM_FREEBSD - # define BX_PLATFORM_FREEBSD 1 +@@ -35,6 +35,7 @@ + #define BX_CRT_MINGW 0 + #define BX_CRT_MSVC 0 + #define BX_CRT_NEWLIB 0 ++#define BX_CRT_BSD 0 + + #ifndef BX_CRT_MUSL + # define BX_CRT_MUSL 0 +@@ -236,6 +237,9 @@ + # elif defined(__apple_build_version__) || defined(__ORBIS__) || defined(__EMSCRIPTEN__) || defined(__llvm__) + # undef BX_CRT_LIBCXX + # define BX_CRT_LIBCXX 1 ++# elif BX_PLATFORM_BSD ++# undef BX_CRT_BSD ++# define BX_CRT_BSD 1 + # endif // + + # if !BX_CRT_BIONIC \ +@@ -244,7 +248,8 @@ + && !BX_CRT_MINGW \ + && !BX_CRT_MSVC \ + && !BX_CRT_MUSL \ +- && !BX_CRT_NEWLIB ++ && !BX_CRT_NEWLIB \ ++ && !BX_CRT_BSD + # undef BX_CRT_NONE + # define BX_CRT_NONE 1 + # endif // BX_CRT_* +@@ -379,6 +384,8 @@ + # define BX_CRT_NAME "Newlib" + #elif BX_CRT_MUSL + # define BX_CRT_NAME "musl libc" ++#elif BX_CRT_BSD ++# define BX_CRT_NAME "BSD" + #elif BX_CRT_NONE + # define BX_CRT_NAME "None" #else diff --git a/emulators/mame/files/patch-3rdparty_bx_include_bx_thread.h b/emulators/mame/files/patch-3rdparty_bx_include_bx_thread.h deleted file mode 100644 index 7420ca47eb84..000000000000 --- a/emulators/mame/files/patch-3rdparty_bx_include_bx_thread.h +++ /dev/null @@ -1,25 +0,0 @@ ---- 3rdparty/bx/include/bx/thread.h.orig 2015-09-30 06:29:01 UTC -+++ 3rdparty/bx/include/bx/thread.h -@@ -14,6 +14,10 @@ using namespace Windows::Foundation; - using namespace Windows::System::Threading; - #endif - -+#if BX_PLATFORM_FREEBSD -+# include <pthread_np.h> -+#endif -+ - #include "sem.h" - - #if BX_CONFIG_SUPPORTS_THREADING -@@ -149,8 +153,10 @@ namespace bx - { - #if BX_PLATFORM_OSX || BX_PLATFORM_IOS - pthread_setname_np(_name); --#elif BX_PLATFORM_LINUX || BX_PLATFORM_FREEBSD -+#elif BX_PLATFORM_LINUX - pthread_setname_np(m_handle, _name); -+#elif BX_PLATFORM_FREEBSD -+ pthread_set_name_np(m_handle, _name); - #elif BX_PLATFORM_WINDOWS && BX_COMPILER_MSVC - # pragma pack(push, 8) - struct ThreadName diff --git a/emulators/mame/files/patch-3rdparty_bx_src_mutex.cpp b/emulators/mame/files/patch-3rdparty_bx_src_mutex.cpp new file mode 100644 index 000000000000..2aabd2397a79 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_bx_src_mutex.cpp @@ -0,0 +1,10 @@ +--- 3rdparty/bx/src/mutex.cpp.orig 2018-02-27 15:59:06 UTC ++++ 3rdparty/bx/src/mutex.cpp +@@ -13,6 +13,7 @@ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ ++ || BX_PLATFORM_BSD \ + || BX_PLATFORM_RPI + # include <pthread.h> + #elif BX_PLATFORM_WINDOWS \ diff --git a/emulators/mame/files/patch-3rdparty_bx_src_thread.cpp b/emulators/mame/files/patch-3rdparty_bx_src_thread.cpp new file mode 100644 index 000000000000..84479c994941 --- /dev/null +++ b/emulators/mame/files/patch-3rdparty_bx_src_thread.cpp @@ -0,0 +1,10 @@ +--- 3rdparty/bx/src/thread.cpp.orig 2018-02-27 15:59:06 UTC ++++ 3rdparty/bx/src/thread.cpp +@@ -11,6 +11,7 @@ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ ++ || BX_PLATFORM_BSD \ + || BX_PLATFORM_RPI + # include <pthread.h> + # if defined(__FreeBSD__) diff --git a/emulators/mame/files/patch-3rdparty_lzma_C_CpuArch.h b/emulators/mame/files/patch-3rdparty_lzma_C_CpuArch.h deleted file mode 100644 index d4a6acf8a2ed..000000000000 --- a/emulators/mame/files/patch-3rdparty_lzma_C_CpuArch.h +++ /dev/null @@ -1,11 +0,0 @@ ---- 3rdparty/lzma/C/CpuArch.h.orig 2015-05-24 15:52:12 UTC -+++ 3rdparty/lzma/C/CpuArch.h -@@ -16,7 +16,7 @@ MY_CPU_LE_UNALIGN means that CPU is LITT - If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform. - */ - --#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) -+#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__amd64__) - #define MY_CPU_AMD64 - #endif - diff --git a/emulators/mame/files/patch-makefile b/emulators/mame/files/patch-makefile new file mode 100644 index 000000000000..92b404b9c912 --- /dev/null +++ b/emulators/mame/files/patch-makefile @@ -0,0 +1,50 @@ +--- makefile.orig 2018-02-27 15:59:06 UTC ++++ makefile +@@ -183,19 +183,19 @@ GENIEOS := solaris + endif + ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD) + OS := freebsd +-GENIEOS := freebsd ++GENIEOS := bsd + endif + ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD) + OS := freebsd +-GENIEOS := freebsd ++GENIEOS := bsd + endif + ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD) + OS := netbsd +-GENIEOS := freebsd ++GENIEOS := bsd + endif + ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD) + OS := openbsd +-GENIEOS := freebsd ++GENIEOS := bsd + endif + ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin) + OS := macosx +@@ -1377,6 +1377,23 @@ freebsd_x86: generate $(PROJECTDIR)/$(MA + $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd config=$(CONFIG)32 + + #------------------------------------------------- ++# gmake-freebsd-clang ++#------------------------------------------------- ++ ++$(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile: makefile $(SCRIPTS) $(GENIE) ++ $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=freebsd-clang --gcc_version=$(CLANG_VERSION) $(MAKETYPE) ++ ++.PHONY: freebsd_x64_clang ++freebsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 ++ ++.PHONY: freebsd_x86_clang ++freebsd_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)32 precompile ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)32 ++ ++#------------------------------------------------- + # gmake-netbsd + #------------------------------------------------- + diff --git a/emulators/mame/files/patch-scripts_toolchain.lua b/emulators/mame/files/patch-scripts_toolchain.lua new file mode 100644 index 000000000000..6324872c164d --- /dev/null +++ b/emulators/mame/files/patch-scripts_toolchain.lua @@ -0,0 +1,21 @@ +--- scripts/toolchain.lua.orig 2018-02-27 15:59:06 UTC ++++ scripts/toolchain.lua +@@ -23,6 +23,7 @@ newoption { + { "android-x64", "Android - x64" }, + { "asmjs", "Emscripten/asm.js" }, + { "freebsd", "FreeBSD" }, ++ { "freebsd-clang", "FreeBSD (Clang)" }, + { "linux-gcc", "Linux (GCC compiler)" }, + { "linux-clang", "Linux (Clang compiler)" }, + { "ios-arm", "iOS - ARM" }, +@@ -168,6 +169,10 @@ function toolchain(_buildDir, _subDir) + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd") + end + ++ if "freebsd-clang" == _OPTIONS["gcc"] then ++ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd-clang") ++ end ++ + if "netbsd" == _OPTIONS["gcc"] then + location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd") + end diff --git a/emulators/mame/files/patch-src__osd__eigccx86.h b/emulators/mame/files/patch-src__osd__eigccx86.h index 5b86d06d333f..88dd86dfbe35 100644 --- a/emulators/mame/files/patch-src__osd__eigccx86.h +++ b/emulators/mame/files/patch-src__osd__eigccx86.h @@ -1,128 +1,110 @@ ---- src/osd/eigccx86.h.orig 2015-05-24 15:52:19 UTC +--- src/osd/eigccx86.h.orig 2018-02-27 15:59:06 UTC +++ src/osd/eigccx86.h -@@ -42,7 +42,7 @@ union _x86_union +@@ -31,7 +31,7 @@ multiply and return the full 64 bit result -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define mul_32x32 _mul_32x32 - INLINE INT64 ATTR_CONST ATTR_FORCE_INLINE - _mul_32x32(INT32 a, INT32 b) -@@ -68,7 +68,7 @@ _mul_32x32(INT32 a, INT32 b) + inline int64_t ATTR_CONST ATTR_FORCE_INLINE + _mul_32x32(int32_t a, int32_t b) +@@ -55,7 +55,7 @@ _mul_32x32(int32_t a, int32_t b) result -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define mulu_32x32 _mulu_32x32 - INLINE UINT64 ATTR_CONST ATTR_FORCE_INLINE - _mulu_32x32(UINT32 a, UINT32 b) -@@ -145,7 +145,7 @@ _mulu_32x32_hi(UINT32 a, UINT32 b) + inline uint64_t ATTR_CONST ATTR_FORCE_INLINE + _mulu_32x32(uint32_t a, uint32_t b) +@@ -126,7 +126,7 @@ _mulu_32x32_hi(uint32_t a, uint32_t b) result to 32 bits -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define mul_32x32_shift _mul_32x32_shift - INLINE INT32 ATTR_CONST ATTR_FORCE_INLINE - _mul_32x32_shift(INT32 a, INT32 b, UINT8 shift) -@@ -175,7 +175,7 @@ _mul_32x32_shift(INT32 a, INT32 b, UINT8 + inline int32_t ATTR_CONST ATTR_FORCE_INLINE + _mul_32x32_shift(int32_t a, int32_t b, uint8_t shift) +@@ -156,7 +156,7 @@ _mul_32x32_shift(int32_t a, int32_t b, u result to 32 bits -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define mulu_32x32_shift _mulu_32x32_shift - INLINE UINT32 ATTR_CONST ATTR_FORCE_INLINE - _mulu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift) -@@ -203,7 +203,7 @@ _mulu_32x32_shift(UINT32 a, UINT32 b, UI + inline uint32_t ATTR_CONST ATTR_FORCE_INLINE + _mulu_32x32_shift(uint32_t a, uint32_t b, uint8_t shift) +@@ -184,7 +184,7 @@ _mulu_32x32_shift(uint32_t a, uint32_t b divide and return the 32 bit quotient -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define div_64x32 _div_64x32 - INLINE INT32 ATTR_CONST ATTR_FORCE_INLINE - _div_64x32(INT64 a, INT32 b) -@@ -230,7 +230,7 @@ _div_64x32(INT64 a, INT32 b) + inline int32_t ATTR_CONST ATTR_FORCE_INLINE + _div_64x32(int64_t a, int32_t b) +@@ -211,7 +211,7 @@ _div_64x32(int64_t a, int32_t b) divide and return the 32 bit quotient -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define divu_64x32 _divu_64x32 - INLINE UINT32 ATTR_CONST ATTR_FORCE_INLINE - _divu_64x32(UINT64 a, UINT32 b) -@@ -258,7 +258,7 @@ _divu_64x32(UINT64 a, UINT32 b) - 32 bit remainder - -------------------------------------------------*/ - + inline uint32_t ATTR_CONST ATTR_FORCE_INLINE + _divu_64x32(uint64_t a, uint32_t b) +@@ -244,7 +244,7 @@ inline int32_t ATTR_FORCE_INLINE + _div_64x32_rem(int64_t dividend, int32_t divisor, int32_t *remainder) + { + int32_t quotient; -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) - #define div_64x32_rem _div_64x32_rem - INLINE INT32 ATTR_FORCE_INLINE - _div_64x32_rem(INT64 dividend, INT32 divisor, INT32 *remainder) -@@ -286,7 +286,7 @@ _div_64x32_rem(INT64 dividend, INT32 div - and 32 bit remainder - -------------------------------------------------*/ + // Throws arithmetic exception if result doesn't fit in 32 bits + __asm__ ( +@@ -287,7 +287,7 @@ inline uint32_t ATTR_FORCE_INLINE + _divu_64x32_rem(uint64_t dividend, uint32_t divisor, uint32_t *remainder) + { + uint32_t quotient; -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) - #define divu_64x32_rem _divu_64x32_rem - INLINE UINT32 ATTR_FORCE_INLINE - _divu_64x32_rem(UINT64 dividend, UINT32 divisor, UINT32 *remainder) -@@ -337,7 +337,7 @@ _divu_64x32_rem(UINT64 dividend, UINT32 + + // Throws arithmetic exception if result doesn't fit in 32 bits + __asm__ ( +@@ -325,7 +325,7 @@ _divu_64x32_rem(uint64_t dividend, uint3 division, and returning the 32 bit quotient -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define div_32x32_shift _div_32x32_shift - INLINE INT32 ATTR_CONST ATTR_FORCE_INLINE - _div_32x32_shift(INT32 a, INT32 b, UINT8 shift) -@@ -369,7 +369,7 @@ _div_32x32_shift(INT32 a, INT32 b, UINT8 + inline int32_t ATTR_CONST ATTR_FORCE_INLINE + _div_32x32_shift(int32_t a, int32_t b, uint8_t shift) +@@ -357,7 +357,7 @@ _div_32x32_shift(int32_t a, int32_t b, u division, and returning the 32 bit quotient -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define divu_32x32_shift _divu_32x32_shift - INLINE UINT32 ATTR_CONST ATTR_FORCE_INLINE - _divu_32x32_shift(UINT32 a, UINT32 b, UINT8 shift) -@@ -400,7 +400,7 @@ _divu_32x32_shift(UINT32 a, UINT32 b, UI + inline uint32_t ATTR_CONST ATTR_FORCE_INLINE + _divu_32x32_shift(uint32_t a, uint32_t b, uint8_t shift) +@@ -388,7 +388,7 @@ _divu_32x32_shift(uint32_t a, uint32_t b divide and return the 32 bit remainder -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define mod_64x32 _mod_64x32 - INLINE INT32 ATTR_CONST ATTR_FORCE_INLINE - _mod_64x32(INT64 a, INT32 b) -@@ -427,7 +427,7 @@ _mod_64x32(INT64 a, INT32 b) + inline int32_t ATTR_CONST ATTR_FORCE_INLINE + _mod_64x32(int64_t a, int32_t b) +@@ -415,7 +415,7 @@ _mod_64x32(int64_t a, int32_t b) divide and return the 32 bit remainder -------------------------------------------------*/ -#ifndef __x86_64__ +#if !defined(__amd64__) && !defined(__x86_64__) #define modu_64x32 _modu_64x32 - INLINE UINT32 ATTR_CONST ATTR_FORCE_INLINE - _modu_64x32(UINT64 a, UINT32 b) -@@ -563,7 +563,7 @@ _compare_exchange32(INT32 volatile *ptr, - return the previous value at 'ptr'. - -------------------------------------------------*/ - --#ifdef __x86_64__ -+#if defined(__amd64__) || defined(__x86_64__) - #define compare_exchange64 _compare_exchange64 - INLINE INT64 ATTR_NONNULL(1) ATTR_FORCE_INLINE - _compare_exchange64(INT64 volatile *ptr, INT64 compare, INT64 exchange) -@@ -693,7 +693,7 @@ _atomic_decrement32(INT32 volatile *ptr) - - #define get_profile_ticks _get_profile_ticks - --#ifndef __x86_64__ -+#if !defined(__amd64__) && !defined(__x86_64__) - INLINE UINT64 ATTR_UNUSED ATTR_FORCE_INLINE _get_profile_ticks(void) - { - UINT64 result; + inline uint32_t ATTR_CONST ATTR_FORCE_INLINE + _modu_64x32(uint64_t a, uint32_t b) diff --git a/emulators/mame/files/patch-src__osd__eminline.h b/emulators/mame/files/patch-src__osd__eminline.h index fc337de4036f..ca0f71526adf 100644 --- a/emulators/mame/files/patch-src__osd__eminline.h +++ b/emulators/mame/files/patch-src__osd__eminline.h @@ -1,8 +1,8 @@ ---- src/osd/eminline.h.orig 2015-05-24 15:52:19 UTC +--- src/osd/eminline.h.orig 2018-02-27 15:59:06 UTC +++ src/osd/eminline.h -@@ -88,7 +88,7 @@ _osd_exchange64(INT64 volatile *ptr, INT +@@ -21,7 +21,7 @@ - #endif + #if defined(__GNUC__) -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) diff --git a/emulators/mame/files/patch-src_emu_webengine.c b/emulators/mame/files/patch-src_emu_webengine.c deleted file mode 100644 index 0c9e5d9f66b1..000000000000 --- a/emulators/mame/files/patch-src_emu_webengine.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/emu/webengine.c.orig 2015-09-30 06:29:01 UTC -+++ src/emu/webengine.c -@@ -330,7 +330,7 @@ int web_engine::begin_request_handler(st - // That upload_data contains more than we need. It also has the headers. - // We'll need to strip it down to just what we want. - -- if ((&data_length > 0) && (sizeof(file_name) > 0)) -+ if ((data_length > 0) && (sizeof(file_name) > 0)) - { - // MSVC doesn't yet support variable-length arrays, so chop the string the old-fashioned way - upload_data[data_length] = '\0'; diff --git a/emulators/mame/files/patch-src_lib_netlist_plib_pparser.c b/emulators/mame/files/patch-src_lib_netlist_plib_pparser.c deleted file mode 100644 index d485049e5eb9..000000000000 --- a/emulators/mame/files/patch-src_lib_netlist_plib_pparser.c +++ /dev/null @@ -1,102 +0,0 @@ ---- src/lib/netlist/plib/pparser.c.orig 2015-09-30 06:29:01 UTC -+++ src/lib/netlist/plib/pparser.c -@@ -28,22 +28,22 @@ pstring ptokenizer::currentline_str() - - void ptokenizer::skipeol() - { -- pstring::code_t c = getc(); -+ pstring::code_t c = mame_getc(); - while (c) - { - if (c == 10) - { -- c = getc(); -+ c = mame_getc(); - if (c != 13) -- ungetc(); -+ mame_ungetc(); - return; - } -- c = getc(); -+ c = mame_getc(); - } - } - - --pstring::code_t ptokenizer::getc() -+pstring::code_t ptokenizer::mame_getc() - { - if (m_px >= m_cur_line.len()) - { -@@ -58,7 +58,7 @@ pstring::code_t ptokenizer::getc() - return m_cur_line.code_at(m_px++); - } - --void ptokenizer::ungetc() -+void ptokenizer::mame_ungetc() - { - m_px--; - } -@@ -166,10 +166,10 @@ ptokenizer::token_t ptokenizer::get_toke - ptokenizer::token_t ptokenizer::get_token_internal() - { - /* skip ws */ -- pstring::code_t c = getc(); -+ pstring::code_t c = mame_getc(); - while (m_whitespace.find(c)>=0) - { -- c = getc(); -+ c = mame_getc(); - if (eof()) - { - return token_t(ENDOFFILE); -@@ -189,9 +189,9 @@ ptokenizer::token_t ptokenizer::get_toke - else if (m_number_chars.find(c)<0) - break; - tokstr += c; -- c = getc(); -+ c = mame_getc(); - } -- ungetc(); -+ mame_ungetc(); - return token_t(ret, tokstr); - } - else if (m_identifier_chars.find(c)>=0) -@@ -200,9 +200,9 @@ ptokenizer::token_t ptokenizer::get_toke - pstring tokstr = ""; - while (m_identifier_chars.find(c)>=0) { - tokstr += c; -- c = getc(); -+ c = mame_getc(); - } -- ungetc(); -+ mame_ungetc(); - token_id_t id = token_id_t(m_tokens.indexof(tokstr)); - if (id.id() >= 0) - return token_t(id, tokstr); -@@ -214,11 +214,11 @@ ptokenizer::token_t ptokenizer::get_toke - else if (c == m_string) - { - pstring tokstr = ""; -- c = getc(); -+ c = mame_getc(); - while (c != m_string) - { - tokstr += c; -- c = getc(); -+ c = mame_getc(); - } - return token_t(STRING, tokstr); - } -@@ -235,9 +235,9 @@ ptokenizer::token_t ptokenizer::get_toke - if (id.id() >= 0) - return token_t(id, tokstr); - } -- c = getc(); -+ c = mame_getc(); - } -- ungetc(); -+ mame_ungetc(); - token_id_t id = token_id_t(m_tokens.indexof(tokstr)); - if (id.id() >= 0) - return token_t(id, tokstr); diff --git a/emulators/mame/files/patch-src_lib_netlist_plib_pparser.cpp b/emulators/mame/files/patch-src_lib_netlist_plib_pparser.cpp new file mode 100644 index 000000000000..4791a05e6db1 --- /dev/null +++ b/emulators/mame/files/patch-src_lib_netlist_plib_pparser.cpp @@ -0,0 +1,102 @@ +--- src/lib/netlist/plib/pparser.cpp.orig 2018-02-27 15:59:06 UTC ++++ src/lib/netlist/plib/pparser.cpp +@@ -34,22 +34,22 @@ pstring ptokenizer::currentline_str() + + void ptokenizer::skipeol() + { +- pstring::code_t c = getc(); ++ pstring::code_t c = mame_getc(); + while (c) + { + if (c == 10) + { +- c = getc(); ++ c = mame_getc(); + if (c != 13) +- ungetc(c); ++ mame_ungetc(c); + return; + } +- c = getc(); ++ c = mame_getc(); + } + } + + +-pstring::code_t ptokenizer::getc() ++pstring::code_t ptokenizer::mame_getc() + { + if (m_unget != 0) + { +@@ -70,7 +70,7 @@ pstring::code_t ptokenizer::getc() + return c; + } + +-void ptokenizer::ungetc(pstring::code_t c) ++void ptokenizer::mame_ungetc(pstring::code_t c) + { + m_unget = c; + } +@@ -182,10 +182,10 @@ ptokenizer::token_t ptokenizer::get_toke + ptokenizer::token_t ptokenizer::get_token_internal() + { + /* skip ws */ +- pstring::code_t c = getc(); ++ pstring::code_t c = mame_getc(); + while (m_whitespace.find(c) != pstring::npos) + { +- c = getc(); ++ c = mame_getc(); + if (eof()) + { + return token_t(ENDOFFILE); +@@ -205,9 +205,9 @@ ptokenizer::token_t ptokenizer::get_toke + else if (m_number_chars.find(c) == pstring::npos) + break; + tokstr += c; +- c = getc(); ++ c = mame_getc(); + } +- ungetc(c); ++ mame_ungetc(c); + return token_t(ret, tokstr); + } + else if (m_identifier_chars.find(c) != pstring::npos) +@@ -217,9 +217,9 @@ ptokenizer::token_t ptokenizer::get_toke + while (m_identifier_chars.find(c) != pstring::npos) + { + tokstr += c; +- c = getc(); ++ c = mame_getc(); + } +- ungetc(c); ++ mame_ungetc(c); + auto id = m_tokens.find(tokstr); + if (id != m_tokens.end()) + return token_t(id->second, tokstr); +@@ -229,11 +229,11 @@ ptokenizer::token_t ptokenizer::get_toke + else if (c == m_string) + { + pstring tokstr = ""; +- c = getc(); ++ c = mame_getc(); + while (c != m_string) + { + tokstr += c; +- c = getc(); ++ c = mame_getc(); + } + return token_t(STRING, tokstr); + } +@@ -251,9 +251,9 @@ ptokenizer::token_t ptokenizer::get_toke + if (id != m_tokens.end()) + return token_t(id->second, tokstr); + } +- c = getc(); ++ c = mame_getc(); + } +- ungetc(c); ++ mame_ungetc(c); + auto id = m_tokens.find(tokstr); + if (id != m_tokens.end()) + return token_t(id->second, tokstr); diff --git a/emulators/mame/files/patch-src_lib_netlist_plib_pparser.h b/emulators/mame/files/patch-src_lib_netlist_plib_pparser.h index 6c950ce9ab7c..37f3c5ac96ee 100644 --- a/emulators/mame/files/patch-src_lib_netlist_plib_pparser.h +++ b/emulators/mame/files/patch-src_lib_netlist_plib_pparser.h @@ -1,13 +1,13 @@ ---- src/lib/netlist/plib/pparser.h.orig 2015-09-30 06:29:01 UTC +--- src/lib/netlist/plib/pparser.h.orig 2018-02-27 15:59:06 UTC +++ src/lib/netlist/plib/pparser.h -@@ -120,8 +120,8 @@ protected: +@@ -118,8 +118,8 @@ protected: private: void skipeol(); - pstring::code_t getc(); -- void ungetc(); +- void ungetc(pstring::code_t c); + pstring::code_t mame_getc(); -+ void mame_ungetc(); ++ void mame_ungetc(pstring::code_t c); bool eof() { return m_strm.eof(); } diff --git a/emulators/mame/files/patch-src_osd_modules_file_posixptty.cpp b/emulators/mame/files/patch-src_osd_modules_file_posixptty.cpp new file mode 100644 index 000000000000..79604da1b82b --- /dev/null +++ b/emulators/mame/files/patch-src_osd_modules_file_posixptty.cpp @@ -0,0 +1,11 @@ +--- src/osd/modules/file/posixptty.cpp.orig 2018-02-27 15:59:06 UTC ++++ src/osd/modules/file/posixptty.cpp +@@ -19,7 +19,7 @@ + #include <unistd.h> + #include <stdlib.h> + +-#if defined(__FreeBSD_kernel__) || defined(__DragonFly__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) + #include <termios.h> + #include <libutil.h> + #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__ANDROID__) diff --git a/emulators/mame/files/patch-src_osd_sdl_sdlprefix.h b/emulators/mame/files/patch-src_osd_sdl_sdlprefix.h index 98f67043a063..1dce6ab01d76 100644 --- a/emulators/mame/files/patch-src_osd_sdl_sdlprefix.h +++ b/emulators/mame/files/patch-src_osd_sdl_sdlprefix.h @@ -1,6 +1,6 @@ ---- src/osd/sdl/sdlprefix.h.orig 2015-04-29 06:18:54 UTC +--- src/osd/sdl/sdlprefix.h.orig 2018-02-27 15:59:06 UTC +++ src/osd/sdl/sdlprefix.h -@@ -50,6 +50,7 @@ +@@ -48,6 +48,7 @@ #define NO_AFFINITY_NP 1 #elif defined(__DragonFly__) #define SDLMAME_DRAGONFLY 1 diff --git a/emulators/mame/files/pkg-message.in b/emulators/mame/files/pkg-message.in index 40ae3480735f..e9519472592a 100644 --- a/emulators/mame/files/pkg-message.in +++ b/emulators/mame/files/pkg-message.in @@ -5,8 +5,4 @@ An example configuration file has been installed in Should you create a "~/.%%MTARGET%%" directory and place it here or launch "%%MTARGET%% -createconfig" and place the %%MTARGET%%.ini created instead. -If you have a non-qwerty keyboard, you should put in your %%MTARGET%%.ini : -keymap 1 -keymap_file %%DATADIR%%/keymaps/km-XX.txt - ============================================================================== |