Move libultra function declarations to libultra headers (#1196)

* Delete unused headers

* Move PR and io to ultra64

* move headers to ultra64

* more cleanups

* more reorganizing

* i think that should be all

* format

* ifdef guards cleanup

* Add IO_READ and IO_WRITE macros for future use

* warnings

* review

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* warnings again

* warn

* ifdef guards

* fix merge

* fix merge

* fix merge

* bss

* padutils.h

* bss

* bss

* bss

* fix merge

* bss

* bss

* bss

* fix merge

* fixes

* fixes

* bss

* bss

* fix merge

* fix

* fix

* fix includepaths

* fix paths

* bss

* fix

* ultra64/ -> PR/

* header guards

* fix ehader guards

* fix

* fix++

* format

* bss is borken

* prevent 2

* :despair:

* bss

* rename assert to dbg_hungup

* fix

* a

* fix

* bss

* fix

* bss

* bss

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal
2023-09-02 15:34:29 -04:00
committed by GitHub
co-authored by Tharo
parent 9cceea48f3
commit 4fa13e4132
162 changed files with 1058 additions and 906 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef ALLOCA_H
#define ALLOCA_H
#ifndef LIBC_ALLOCA_H
#define LIBC_ALLOCA_H
void* alloca(u32);
#define alloca __builtin_alloca
-4
View File
@@ -1,4 +0,0 @@
#ifndef ASSERT_H
#define ASSERT_H
#endif
+6 -4
View File
@@ -1,5 +1,5 @@
#ifndef MATH_H
#define MATH_H
#ifndef LIBC_MATH_H
#define LIBC_MATH_H
#include "PR/ultratypes.h"
@@ -27,8 +27,10 @@ extern f32 __libm_qnan_f;
float fabsf(float f);
#pragma intrinsic(fabsf)
float sqrtf(float f);
#pragma intrinsic(sqrtf)
#ifdef __GNUC__
#define fabsf(f) __builtin_fabsf((float)(f))
#endif
double sqrt(double d);
#pragma intrinsic(sqrt)
+2 -4
View File
@@ -1,7 +1,5 @@
#ifndef STDARG_H
#define STDARG_H
#include "ultra64.h"
#ifndef LIBC_STDARG_H
#define LIBC_STDARG_H
// When building with GCC, use the official vaarg macros to avoid warnings
// and possibly bad codegen.
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef STDBOOL
#define STDBOOL
#ifndef LIBC_STDBOOL_H
#define LIBC_STDBOOL_H
#define __bool_true_false_are_defined 1
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef STDDEF_H
#define STDDEF_H
#ifndef LIBC_STDDEF_H
#define LIBC_STDDEF_H
#include "PR/ultratypes.h"
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef STDINT_H
#define STDINT_H
#ifndef LIBC_STDINT_H
#define LIBC_STDINT_H
#include "PR/ultratypes.h"
+5 -2
View File
@@ -1,5 +1,5 @@
#ifndef STDLIB_H
#define STDLIB_H
#ifndef LIBC_STDLIB_H
#define LIBC_STDLIB_H
#include "libc/stddef.h"
@@ -22,4 +22,7 @@ typedef int ssize_t;
typedef long wchar_t;
ldiv_t ldiv(long numer, long denom);
lldiv_t lldiv(long long numer, long long denom);
#endif /* STDLIB_H */
+12
View File
@@ -0,0 +1,12 @@
#ifndef LIBC_STRING_H
#define LIBC_STRING_H
#include "libc/stddef.h"
const char* strchr(const char* s, int c);
size_t strlen(const char* s);
void* memcpy(void* s1, const void* s2, size_t n);
#endif