From 9314196b00fe8d1441f5cf81c04bcbbc7eb3ba73 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 27 Jan 2021 14:15:24 +0100 Subject: [PATCH] Do away with ARM_ENABLED check - and make it compile on ARM64 mac --- Makefile | 4 ---- jni/Android.mk | 4 ---- src/osd/retro/osinline.h | 3 +-- src/osd/retro/retroos.c | 4 ++-- src/osd/retro/retrowork.c | 1 + 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index e55363d..17fb136 100644 --- a/Makefile +++ b/Makefile @@ -849,10 +849,6 @@ endif # generic rules #------------------------------------------------- -ifeq ($(ARM_ENABLED), 1) -CFLAGS += -DARM_ENABLED -endif - ifeq ($(X86_SH2DRC), 0) CFLAGS += -DDISABLE_SH2DRC endif diff --git a/jni/Android.mk b/jni/Android.mk index c03d348..48828bd 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -38,10 +38,6 @@ COREFLAGS += -DCRLF=2 -DINLINE="static inline" -Wno-c++11-narrowing -Wno-reserve # For testing only, remove before PR COREFLAGS += -Wno-implicit-exception-spec-mismatch -Wno-inline-new-delete -Wno-tautological-undefined-compare -ifneq ($(filter $(TARGET_ARCH_ABI), armeabi-v7a arm64-v8a),) - COREFLAGS += -DARM_ENABLED -endif - GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)" ifneq ($(GIT_VERSION)," unknown") COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" diff --git a/src/osd/retro/osinline.h b/src/osd/retro/osinline.h index 8f8d45a..afeae9e 100644 --- a/src/osd/retro/osinline.h +++ b/src/osd/retro/osinline.h @@ -35,8 +35,7 @@ empty #endif -#if defined(ARM_ENABLED) - +#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__) || defined(_M_ARM) #ifndef YieldProcessor #define YieldProcessor() do {} while (0) #define osd_yield_processor() YieldProcessor() diff --git a/src/osd/retro/retroos.c b/src/osd/retro/retroos.c index 8652554..b4b2a07 100644 --- a/src/osd/retro/retroos.c +++ b/src/osd/retro/retroos.c @@ -383,13 +383,13 @@ osd_directory_entry *osd_stat(const char *path) { int err; osd_directory_entry *result = NULL; - #if defined(SDLMAME_NO64BITIO) || defined(ANDROID) || defined(WIN32) || defined(SDLMAME_BSD) + #if defined(SDLMAME_NO64BITIO) || defined(ANDROID) || defined(WIN32) || defined(SDLMAME_BSD) || defined(__APPLE__) struct stat st; #else struct stat64 st; #endif - #if defined(SDLMAME_NO64BITIO) || defined(ANDROID) || defined(WIN32) || defined(SDLMAME_BSD) + #if defined(SDLMAME_NO64BITIO) || defined(ANDROID) || defined(WIN32) || defined(SDLMAME_BSD) || defined(__APPLE__) err = stat(path, &st); #else err = stat64(path, &st); diff --git a/src/osd/retro/retrowork.c b/src/osd/retro/retrowork.c index 3ffa11a..de9b390 100644 --- a/src/osd/retro/retrowork.c +++ b/src/osd/retro/retrowork.c @@ -6,6 +6,7 @@ #include "retroos.h" #include "eminline.h" +#include "osinline.h" //============================================================ // DEBUGGING