use only __linux__

This commit is contained in:
lizzie 2026-06-01 19:37:41 +00:00 committed by crueter
parent 48945f7082
commit 2a2bf05e41
4 changed files with 12 additions and 10 deletions

View file

@ -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)

View file

@ -10,12 +10,10 @@
#pragma once
#if defined(_MSC_VER)
#include <cstdlib>
#endif
#include <bit>
#include <cstring>
#include <type_traits>
#include <bit>
#include "common/common_types.h"
namespace Common {

View file

@ -75,7 +75,7 @@ ArgCallback DevirtualizeItanium(mcl::class_type<decltype(mfp)>* this_) {
template<auto mfp>
ArgCallback Devirtualize(mcl::class_type<decltype(mfp)>* this_) {
#if defined(__APPLE__) || defined(linux) || defined(__linux) || defined(__linux__)
#if defined(__APPLE__) || defined(__linux__)
return DevirtualizeItanium<mfp>(this_);
#elif defined(__MINGW64__)
return DevirtualizeItanium<mfp>(this_);

View file

@ -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 ;;