blu_os
Loading...
Searching...
No Matches
stddef.h
Go to the documentation of this file.
1//
2// Created by dylan on 13/07/2026.
3//
4
5#ifndef BLU_OS_STDDEF_H
6#define BLU_OS_STDDEF_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
18
19#include <stdint.h>
20
21#ifdef __x86_64__
22typedef uint64_t size_t;
23#define SIZE_MAX UINT64_MAX
24#else
25typedef uint32_t size_t;
26#define SIZE_MAX UINT32_MAX
27#endif
28
29#ifdef __x86_64__
30typedef long ptrdiff_t;
31#define PTRDIFF_MIN (-9223372036854775807L - 1)
32#define PTRDIFF_MAX 9223372036854775807L
33#else
34typedef int ptrdiff_t;
35#define PTRDIFF_MIN (-2147483648)
36#define PTRDIFF_MAX 2147483647
37#endif
38
39typedef int wchar_t;
40#define WCHAR_MIN (-2147483648)
41#define WCHAR_MAX 2147483647
42
43#ifndef NULL
44#define NULL ((void*) 0)
45#endif
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif //BLU_OS_STDDEF_H
Fixed-width integer types.