diff --git a/libc.h b/libc.h index b50a99c..3dc88c0 100644 --- a/libc.h +++ b/libc.h @@ -1,10 +1,12 @@ #ifndef UNDAR_LIBC_H #define UNDAR_LIBC_H - #if defined(__has_include) #if __has_include() #define HAVE_STDINT 1 #endif +#if __has_include() && !defined(__EMSCRIPTEN__) +#define HAVE_STDBOOL 1 +#endif #if __has_include() #define HAVE_STDDEF 1 #endif @@ -31,9 +33,13 @@ typedef signed int r32; typedef float f32; #endif +#ifdef HAVE_STDBOOL +#include +#else #define true 1 #define false 0 typedef u8 bool; +#endif #ifdef HAVE_STDDEF #include