mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
6e711e0f2d
The Windows->Linux POSIX port left the recompiler and runtime almost portable; two small platform gaps remained on macOS (AppleClang, arm64), both guarded so Windows/Linux are unaffected: - runtime/src/autocompile.c: add #include <stdlib.h> for getenv. glibc and windows.h leak that declaration transitively; the macOS SDK does not, so AppleClang errored on the implicit declaration. - recompiler/src/main_bios.cpp: the C-compiler probe used ">NUL" (Windows null device). On POSIX that misdirects the redirect and drops a stray "NUL" file in the cwd; now #ifdef'd to /dev/null. The ucontext fiber backend already carried the _XOPEN_SOURCE/_DARWIN_C_SOURCE guards it needs; SDL2 (Homebrew) selects the Metal backend automatically. Verified end to end on macOS 15.5 / Apple Silicon: BIOS -> KULA WORLD title -> menu -> 1 Player -> a 3D level that rolls under control. Adds docs/MACOS_BUILD_KULA.md and a macOS gameplay screenshot; README notes the port. Ignores the local dist/ .app bundle (recompiled-BIOS derivative). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>