fix build stuff

This commit is contained in:
zongor 2026-06-29 16:50:26 -07:00
parent 0f67dd1318
commit 9525294d41
1 changed files with 7 additions and 1 deletions

8
libc.h
View File

@ -1,10 +1,12 @@
#ifndef UNDAR_LIBC_H #ifndef UNDAR_LIBC_H
#define UNDAR_LIBC_H #define UNDAR_LIBC_H
#if defined(__has_include) #if defined(__has_include)
#if __has_include(<stdint.h>) #if __has_include(<stdint.h>)
#define HAVE_STDINT 1 #define HAVE_STDINT 1
#endif #endif
#if __has_include(<stdbool.h>) && !defined(__EMSCRIPTEN__)
#define HAVE_STDBOOL 1
#endif
#if __has_include(<stddef.h>) #if __has_include(<stddef.h>)
#define HAVE_STDDEF 1 #define HAVE_STDDEF 1
#endif #endif
@ -31,9 +33,13 @@ typedef signed int r32;
typedef float f32; typedef float f32;
#endif #endif
#ifdef HAVE_STDBOOL
#include <stdbool.h>
#else
#define true 1 #define true 1
#define false 0 #define false 0
typedef u8 bool; typedef u8 bool;
#endif
#ifdef HAVE_STDDEF #ifdef HAVE_STDDEF
#include <stddef.h> #include <stddef.h>