feat(libc): add freestanding types and string helpers

This commit is contained in:
dualfroz committed 2026-08-23 19:48:16 +02:00
1 parent fbe59c8ffc
commit c111550d0e
3 files changed
+104

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#ifndef FROSTBYTE_STRING_H
#define FROSTBYTE_STRING_H
#include "types.h"
void* memset(void* dest, int value, usize count);
void* memcpy(void* dest, const void* src, usize count);
void* memmove(void* dest, const void* src, usize count);
int memcmp(const void* a, const void* b, usize count);
usize strlen(const char* str);
int strcmp(const char* a, const char* b);
int strncmp(const char* a, const char* b, usize count);
#endif
+21
View File
@@ -0,0 +1,21 @@
#ifndef FROSTBYTE_TYPES_H
#define FROSTBYTE_TYPES_H
typedef unsigned char uint8;
typedef signed char int8;
typedef unsigned short uint16;
typedef signed short int16;
typedef unsigned int uint32;
typedef signed int int32;
typedef unsigned long uint64;
typedef signed long int64;
typedef unsigned long usize;
typedef signed long isize;
typedef unsigned long uintptr;
typedef enum { false = 0, true = 1 } bool;
#define nullptr ((void*)0)
#endif