Fix ultratypes types (#1454)

* Fix ultratypes types

* Add back size_t and NULL

* Callocs

* Callocs pt 2

* bool

* STDC version checks
This commit is contained in:
Derek Hensley
2023-11-15 22:01:42 -07:00
committed by GitHub
parent d9585d7444
commit 5acaec4486
54 changed files with 178 additions and 171 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ void bcopy(void* __src, void* __dest, int __n);
int bcmp(void* __s1, void* __s2, int __n);
void bzero(void* begin, int length);
s32 vsprintf(char* dst, char* fmt, va_list args);
int vsprintf(char* dst, char* fmt, va_list args);
int sprintf(char* dst, const char* fmt, ...);
void osSyncPrintf(const char* fmt, ...);
+2 -2
View File
@@ -18,8 +18,8 @@ typedef struct OSTimer_s {
OSTime osGetTime(void);
void osSetTime(OSTime ticks);
s32 osSetTimer(OSTimer* t, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
s32 osStopTimer(OSTimer* t);
int osSetTimer(OSTimer* t, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
int osStopTimer(OSTimer* t);
#endif
+8 -4
View File
@@ -5,8 +5,8 @@ typedef signed char s8;
typedef unsigned char u8;
typedef signed short int s16;
typedef unsigned short int u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long s32;
typedef unsigned long u32;
typedef signed long long int s64;
typedef unsigned long long int u64;
@@ -22,10 +22,14 @@ typedef volatile s64 vs64;
typedef float f32;
typedef double f64;
typedef u32 size_t;
#if defined(_MIPS_SZLONG) && (_MIPS_SZLONG == 64)
typedef unsigned long size_t;
#else
typedef unsigned int size_t;
#endif
#ifndef NULL
#define NULL (void*)0
#define NULL ((void*)0)
#endif
// TODO: move this somewhere else
+1 -1
View File
@@ -31,7 +31,7 @@ typedef void* (*PrintCallback)(void*, const char*, size_t);
#define FLAGS_HASH 8
#define FLAGS_ZERO 16
s32 _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap);
int _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap);
void _Litob(_Pft* args, u8 type);
void _Ldtob(_Pft* args, u8 type);