Files
KirkOS/libs/uacpi/include/uacpi/platform/libc.h
T
2026-04-15 13:42:16 -04:00

45 lines
1.0 KiB
C

#pragma once
#include "mm/memory.h"
#include "string.h"
#include "stdio.h"
#ifdef UACPI_OVERRIDE_LIBC
#include "uacpi_libc.h"
#else
/*
* The following libc functions are used internally by uACPI and have a default
* (sub-optimal) implementation:
* - strcmp
* - strnlen
* - strlen
* - snprintf
* - vsnprintf
*
* The following use a builtin implementation only if UACPI_USE_BUILTIN_STRING
* is defined (more information can be found in the config.h header):
* - memcpy
* - memmove
* - memset
* - memcmp
*
* In case your platform happens to implement optimized verisons of the helpers
* above, you are able to make uACPI use those instead by overriding them like so:
*
* #define uacpi_memcpy my_fast_memcpy
* #define uacpi_snprintf my_fast_snprintf
*/
#define uacpi_strlen strlen
#define uacpi_strnlen strnlen
#define uacpi_strcmp strcmp
#define uacpi_vsnprintf vsnprintf
#define uacpi_snprintf snprintf
#define uacpi_memcpy memcpy
#define uacpi_memmove memmove
#define uacpi_memset memset
#define uacpi_memcmp memcmp
#endif