This commit is contained in:
flysand7 2023-08-02 20:05:26 +11:00
parent d86ac28629
commit bf0d06eeb4
3 changed files with 18 additions and 8 deletions

View File

@ -4,14 +4,12 @@
// Include platform stuff
#include <cia-conf.h>
// Pre-C23 keyword macros and stddef
// Pre-C23 keyword macros
#define static_assert _Static_assert
#define NULL ((void *)0)
// Assert commonly-accepted platform-invariant sizes
#include <stdint.h>
#include <stdbool.h>
// Stdint and a layer on top
#include <stdint.h>
// Short type definitions
typedef int8_t i8;
typedef uint8_t u8;
@ -21,3 +19,7 @@ typedef int32_t i32;
typedef uint32_t u32;
typedef int64_t i64;
typedef uint64_t u64;
// Other commonly-used standard includes
#include <stdbool.h>
#include <stddef.h>

10
src/include/stddef.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include <cia-def.h>
typedef u64 size_t;
#if !defined(NULL)
#define NULL ((void *)0)
#endif

View File

@ -4,8 +4,6 @@
#include <cia-def.h>
#include <tinyrt.h>
typedef u64 size_t;
typedef struct FILE FILE;
struct FILE {
_RT_File rt_file;