From 6fe3a6e98af4c24e1b1ea2e5251e96bde7a26211 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 1 Jun 2026 19:37:41 +0000 Subject: [PATCH] use only __linux__ --- CMakeLists.txt | 4 +++- src/common/swap.h | 4 +--- src/dynarmic/src/dynarmic/backend/x64/devirtualize.h | 2 +- tools/cpp-lint.sh | 12 +++++++----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c797261488..228580e331 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,7 +306,7 @@ if (YUZU_ROOM) add_compile_definitions(YUZU_ROOM) endif() -if ((ANDROID OR APPLE OR UNIX) AND (NOT PLATFORM_LINUX OR ANDROID) AND NOT WIN32) +if (UNIX AND NOT (PLATFORM_LINUX OR WIN32)) if(CXX_APPLE OR CXX_CLANG) # libc++ has stop_token and jthread as experimental set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library") @@ -524,6 +524,8 @@ elseif (WIN32) # PSAPI is the Process Status API set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock) endif() +elseif (PLATFORM_MANAGARM) + set(PLATFORM_LIBRARIES iconv intl) elseif (PLATFORM_HAIKU) # Haiku is so special :) set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so) diff --git a/src/common/swap.h b/src/common/swap.h index 1cf8a6ba39..1184ac5785 100644 --- a/src/common/swap.h +++ b/src/common/swap.h @@ -10,12 +10,10 @@ #pragma once -#if defined(_MSC_VER) #include -#endif -#include #include #include +#include #include "common/common_types.h" namespace Common { diff --git a/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h b/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h index e6efe010ff..9b618fe71b 100644 --- a/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h +++ b/src/dynarmic/src/dynarmic/backend/x64/devirtualize.h @@ -75,7 +75,7 @@ ArgCallback DevirtualizeItanium(mcl::class_type* this_) { template ArgCallback Devirtualize(mcl::class_type* this_) { -#if defined(__APPLE__) || defined(linux) || defined(__linux) || defined(__linux__) +#if defined(__APPLE__) || defined(__linux__) return DevirtualizeItanium(this_); #elif defined(__MINGW64__) return DevirtualizeItanium(this_); diff --git a/tools/cpp-lint.sh b/tools/cpp-lint.sh index 70e23f9753..1318c0d6f3 100755 --- a/tools/cpp-lint.sh +++ b/tools/cpp-lint.sh @@ -5,6 +5,8 @@ # tools/../ ROOTDIR=$(CDPATH='' cd -- "$(dirname -- "$0")/../" && pwd) +BUILD_DIR="$ROOTDIR"/build +SRC_DIR="$ROOTDIR"/src die() { echo "-- $*" >&2 @@ -31,14 +33,14 @@ EOF while :; do case "$1" in once) - find "$ROOTDIR/src" -type f -name "*.h" -exec grep -L "#pragma once" {} + + find "$SRC_DIR" -type f -name "*.h" -exec grep -L "#pragma once" {} + break ;; osdef) - find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "ANDROID" {} + - find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "_WIN64" {} + - find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__linux" {} + - find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__unix" {} + + find "$SRC_DIR" -type f -name "*.h" \ + -exec grep -nw "ANDROID\|_WIN64\|__linux\|__unix\|APPLE\|__APPLE" {} + || echo + find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef linux\|(linux)" {} + || echo + find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef unix\|(unix)" {} + || echo break ;; *) usage ;;