[Build] Generalize POSIX platform guards

Most non-Windows code paths use standard POSIX APIs (sockets, signals,
dlopen, threading) that work on any POSIX platform. Change Linux-specific
guards to !WIN32 or #else where the code is portable. Linux-specific
APIs (SIGRTMIN, Vulkan/X11, fontconfig/GTK) remain Linux-guarded.
This commit is contained in:
Herman S.
2026-03-26 22:07:28 +09:00
parent 6c20f64e0d
commit cb12f7fa1e
10 changed files with 39 additions and 48 deletions

View File

@@ -244,7 +244,7 @@ dword_result_t NtSuspendThread_entry(dword_t handle,
} else {
return X_STATUS_THREAD_IS_TERMINATING;
}
#elif XE_PLATFORM_LINUX
#else
// Handle self-suspension specially to avoid deadlock.
if (!thread->guest_object<X_KTHREAD>()->terminated) {
bool is_self_suspend =
@@ -261,8 +261,6 @@ dword_result_t NtSuspendThread_entry(dword_t handle,
} else {
return X_STATUS_THREAD_IS_TERMINATING;
}
#else
#error "Unsupported platform"
#endif
} else {
return X_STATUS_OBJECT_TYPE_MISMATCH;