summaryrefslogtreecommitdiff
path: root/include/PR
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2023-11-15 22:01:42 -0700
committerGitHub <noreply@github.com>2023-11-16 16:01:42 +1100
commit5acaec4486a6ba9c6a308c3987f664d1bbe6ab6b (patch)
tree1bd1f4ee664b19afffa85021f5d996285b6db613 /include/PR
parentd9585d7444cdd3a3fe0c49807163ce8132c11956 (diff)
Fix ultratypes types (#1454)
* Fix ultratypes types * Add back size_t and NULL * Callocs * Callocs pt 2 * bool * STDC version checks
Diffstat (limited to 'include/PR')
-rw-r--r--include/PR/os_libc.h2
-rw-r--r--include/PR/os_time.h4
-rw-r--r--include/PR/ultratypes.h12
-rw-r--r--include/PR/xstdio.h2
4 files changed, 12 insertions, 8 deletions
diff --git a/include/PR/os_libc.h b/include/PR/os_libc.h
index 755f24692..ffbf87993 100644
--- a/include/PR/os_libc.h
+++ b/include/PR/os_libc.h
@@ -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, ...);
diff --git a/include/PR/os_time.h b/include/PR/os_time.h
index d0da9b8a9..4c825c38c 100644
--- a/include/PR/os_time.h
+++ b/include/PR/os_time.h
@@ -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
diff --git a/include/PR/ultratypes.h b/include/PR/ultratypes.h
index 76afdf6a0..3f04c6ed3 100644
--- a/include/PR/ultratypes.h
+++ b/include/PR/ultratypes.h
@@ -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
diff --git a/include/PR/xstdio.h b/include/PR/xstdio.h
index 9850d88f8..76972871d 100644
--- a/include/PR/xstdio.h
+++ b/include/PR/xstdio.h
@@ -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);