2026-02-18 13:40:19 +01:00
|
|
|
#ifndef FERNLADER_STD_H
|
|
|
|
|
#define FERNLADER_STD_H
|
|
|
|
|
|
|
|
|
|
/* Since fernlader may be built with bog-standard GCC C compiler
|
|
|
|
|
* (not a freestanding cross compiler), we can't rely on any of
|
|
|
|
|
* the compiler-provided definitions like those in stdint.h.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// stddef.h
|
|
|
|
|
|
|
|
|
|
#define NULL ((void *)0)
|
|
|
|
|
|
|
|
|
|
typedef unsigned long size_t;
|
|
|
|
|
|
|
|
|
|
// stdint.h
|
|
|
|
|
|
|
|
|
|
typedef signed char int8_t;
|
|
|
|
|
typedef signed short int16_t;
|
|
|
|
|
typedef signed int int32_t;
|
|
|
|
|
typedef signed long long int64_t;
|
|
|
|
|
|
|
|
|
|
typedef unsigned char uint8_t;
|
|
|
|
|
typedef unsigned short uint16_t;
|
|
|
|
|
typedef unsigned int uint32_t;
|
|
|
|
|
typedef unsigned long long uint64_t;
|
|
|
|
|
|
|
|
|
|
// stdbool.h
|
|
|
|
|
|
|
|
|
|
#define true ((_Bool)1)
|
|
|
|
|
#define false ((_Bool)0)
|
|
|
|
|
|
|
|
|
|
typedef _Bool bool;
|
|
|
|
|
|
|
|
|
|
// string.h
|
|
|
|
|
|
|
|
|
|
void *memcpy (void *dst, const void *src, size_t n);
|
|
|
|
|
void *memmove(void *dst, const void *src, size_t n);
|
|
|
|
|
void *memset (void *dst, int c, size_t n);
|
|
|
|
|
int memcmp (const void *src1, const void *src2, size_t n);
|
|
|
|
|
|
|
|
|
|
#endif
|