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) add_compile_definitions(YUZU_ROOM)
endif() 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) if(CXX_APPLE OR CXX_CLANG)
# libc++ has stop_token and jthread as experimental # libc++ has stop_token and jthread as experimental
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library")
@ -524,6 +524,8 @@ elseif (WIN32)
# PSAPI is the Process Status API # PSAPI is the Process Status API
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock) set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock)
endif() endif()
elseif (PLATFORM_MANAGARM)
set(PLATFORM_LIBRARIES iconv intl)
elseif (PLATFORM_HAIKU) elseif (PLATFORM_HAIKU)
# Haiku is so special :) # Haiku is so special :)
set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so) set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so)

View file

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

View file

@ -75,7 +75,7 @@ ArgCallback DevirtualizeItanium(mcl::class_type<decltype(mfp)>* this_) {
template<auto mfp> template<auto mfp>
ArgCallback Devirtualize(mcl::class_type<decltype(mfp)>* this_) { 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_); return DevirtualizeItanium<mfp>(this_);
#elif defined(__MINGW64__) #elif defined(__MINGW64__)
return DevirtualizeItanium<mfp>(this_); return DevirtualizeItanium<mfp>(this_);

View file

@ -5,6 +5,8 @@
# tools/../ # tools/../
ROOTDIR=$(CDPATH='' cd -- "$(dirname -- "$0")/../" && pwd) ROOTDIR=$(CDPATH='' cd -- "$(dirname -- "$0")/../" && pwd)
BUILD_DIR="$ROOTDIR"/build
SRC_DIR="$ROOTDIR"/src
die() { die() {
echo "-- $*" >&2 echo "-- $*" >&2
@ -31,14 +33,14 @@ EOF
while :; do while :; do
case "$1" in case "$1" in
once) 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 break
;; ;;
osdef) osdef)
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "ANDROID" {} + find "$SRC_DIR" -type f -name "*.h" \
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "_WIN64" {} + -exec grep -nw "ANDROID\|_WIN64\|__linux\|__unix\|APPLE\|__APPLE" {} + || echo
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__linux" {} + find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef linux\|(linux)" {} + || echo
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__unix" {} + find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef unix\|(unix)" {} + || echo
break break
;; ;;
*) usage ;; *) usage ;;