From 3ed74350129c71682554c22cc78b85228f0bb371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 19 Jun 2022 16:31:07 +0200 Subject: [PATCH] Avoid including signal.h from CommonFuncs.h --- Common/CommonFuncs.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Common/CommonFuncs.h b/Common/CommonFuncs.h index 72cf14356f..d7bda736cd 100644 --- a/Common/CommonFuncs.h +++ b/Common/CommonFuncs.h @@ -17,6 +17,8 @@ #pragma once +#include "ppsspp_config.h" + #include "CommonTypes.h" #ifndef ARRAY_SIZE @@ -28,11 +30,12 @@ #include #include -#if defined(_M_IX86) || defined(_M_X86) +#if PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64) #define Crash() {asm ("int $3");} -#else -#include -#define Crash() {kill(getpid(), SIGINT);} +#elif PPSSPP_ARCH(ARM) +#define Crash() {asm ("bkpt #0");} +#elif PPSSPP_ARCH(ARM64) +#define Crash() {asm ("brk #0");} #endif inline u32 __rotl(u32 x, int shift) { @@ -64,11 +67,12 @@ inline u64 __rotr64(u64 x, unsigned int shift){ #define strcasecmp _stricmp #define strncasecmp _strnicmp #endif - #define unlink _unlink - #define __rotl _rotl - #define __rotl64 _rotl64 - #define __rotr _rotr - #define __rotr64 _rotr64 + +#define unlink _unlink +#define __rotl _rotl +#define __rotl64 _rotl64 +#define __rotr _rotr +#define __rotr64 _rotr64 // 64 bit offsets for windows #ifndef __MINGW32__