Files
goldeneye-pc-port/port/shim/stdlib.h
T
James Dansereau 52539d10de Prepare for public release
- README, LICENSE (MIT for the port layer), NOTICE, CONTRIBUTING.
- Restructure docs: internals.md, porting-notes.md, dev-process.md +
  dev/agentic-development.md (the research write-up), dev/ (raw record).
- Replace decomp status-badge CI with a PC-port validate workflow.
- Remove session/agent scaffolding and stale planning docs from the tree.
- Add .gitattributes (normalize line endings to LF); add screenshots.

The pre-2026-08 history is the GoldenEye 007 decompilation by Larry Ficken
(KholdFuzion) and contributors, preserved unchanged. The PC-port work from
2026-08-17 on is mine.
2026-09-01 19:28:59 -04:00

21 lines
805 B
C

/*
* PC port shim for <stdlib.h>.
*
* The N64 decomp ships include/stdlib.h (a libc stub: lldiv_t/ldiv_t typedefs
* + a couple of prototypes). C game code gets it, exactly as on the console.
*
* In C++ TUs (fast3d) it must NOT be used: MinGW's own headers pull in the
* host <stdlib.h> through their include chains (sec_api/stdlib_s.h does
* `#include <stdlib.h>`, which resolves to the N64 header via -I), and the
* lldiv_t/ldiv_t typedefs then conflict with the host's. The shim routes C++
* TUs to the host header by absolute path (generated hoststdlib.h, same
* trick as port/shim/string.h — see docs/internals.md §11 D12).
*
* Inert in the N64 build (port/shim is not on its include path).
*/
#if defined(__cplusplus)
#include "hoststdlib.h"
#else
#include "include/stdlib.h"
#endif