Initial commit
This commit is contained in:
commit
cd6b32c10a
5
LICENSE.md
Normal file
5
LICENSE.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Copyright 2022 mintsuki and contributors.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
1
README
Normal file
1
README
Normal file
@ -0,0 +1 @@
|
|||||||
|
This is a collection of freestanding C headers, for use with GCC or Clang.
|
10
stdalign.h
Normal file
10
stdalign.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef __STDALIGN_H__
|
||||||
|
#define __STDALIGN_H__
|
||||||
|
|
||||||
|
#define alignas(a) _Alignas(a)
|
||||||
|
#define alignof(t) _Alignof(t)
|
||||||
|
|
||||||
|
#define __alignas_is_defined 1
|
||||||
|
#define __alignof_is_defined 1
|
||||||
|
|
||||||
|
#endif
|
11
stdarg.h
Normal file
11
stdarg.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef __STDARG_H__
|
||||||
|
#define __STDARG_H__
|
||||||
|
|
||||||
|
typedef __builtin_va_list va_list;
|
||||||
|
|
||||||
|
#define va_start(v, l) __builtin_va_start(v, l)
|
||||||
|
#define va_end(v) __builtin_va_end(v)
|
||||||
|
#define va_arg(v, l) __builtin_va_arg(v, l)
|
||||||
|
#define va_copy(d, s) __builtin_va_copy(d, s)
|
||||||
|
|
||||||
|
#endif
|
11
stdbool.h
Normal file
11
stdbool.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef __STDBOOL_H__
|
||||||
|
#define __STDBOOL_H__
|
||||||
|
|
||||||
|
#define bool _Bool
|
||||||
|
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
|
||||||
|
#define __bool_true_false_are_defined 1
|
||||||
|
|
||||||
|
#endif
|
16
stddef.h
Normal file
16
stddef.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef __STDDEF_H__
|
||||||
|
#define __STDDEF_H__
|
||||||
|
|
||||||
|
typedef __SIZE_TYPE__ size_t;
|
||||||
|
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||||
|
typedef __WCHAR_TYPE__ wchar_t;
|
||||||
|
|
||||||
|
#ifdef NULL
|
||||||
|
#undef NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NULL ((void *)0)
|
||||||
|
|
||||||
|
#define offsetof(s, m) __builtin_offsetof(s, m)
|
||||||
|
|
||||||
|
#endif
|
54
stdint.h
Normal file
54
stdint.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#ifndef __STDINT_H__
|
||||||
|
#define __STDINT_H__
|
||||||
|
|
||||||
|
typedef __UINT8_TYPE__ uint8_t;
|
||||||
|
typedef __UINT16_TYPE__ uint16_t;
|
||||||
|
typedef __UINT32_TYPE__ uint32_t;
|
||||||
|
typedef __UINT64_TYPE__ uint64_t;
|
||||||
|
|
||||||
|
typedef __INT8_TYPE__ int8_t;
|
||||||
|
typedef __INT16_TYPE__ int16_t;
|
||||||
|
typedef __INT32_TYPE__ int32_t;
|
||||||
|
typedef __INT64_TYPE__ int64_t;
|
||||||
|
|
||||||
|
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||||
|
typedef __INTPTR_TYPE__ intptr_t;
|
||||||
|
|
||||||
|
typedef __UINTMAX_TYPE__ uintmax_t;
|
||||||
|
typedef __INTMAX_TYPE__ intmax_t;
|
||||||
|
|
||||||
|
#define INT8_MAX __INT8_MAX__
|
||||||
|
#define INT16_MAX __INT16_MAX__
|
||||||
|
#define INT32_MAX __INT32_MAX__
|
||||||
|
#define INT64_MAX __INT64_MAX__
|
||||||
|
|
||||||
|
#define UINT8_MAX __UINT8_MAX__
|
||||||
|
#define UINT16_MAX __UINT16_MAX__
|
||||||
|
#define UINT32_MAX __UINT32_MAX__
|
||||||
|
#define UINT64_MAX __UINT64_MAX__
|
||||||
|
|
||||||
|
#define INT8_MIN (-INT8_MAX - 1)
|
||||||
|
#define INT16_MIN (-INT16_MAX - 1)
|
||||||
|
#define INT32_MIN (-INT32_MAX - 1)
|
||||||
|
#define INT64_MIN (-INT64_MAX - 1)
|
||||||
|
|
||||||
|
#define UINTPTR_MAX __UINTPTR_MAX__
|
||||||
|
#define INTPTR_MAX __INTPTR_MAX__
|
||||||
|
#define INTPTR_MIN (-INTPTR_MAX - 1)
|
||||||
|
|
||||||
|
#define UINTMAX_MAX __UINTMAX_MAX__
|
||||||
|
#define INTMAX_MAX __INTMAX_MAX__
|
||||||
|
#define INTMAX_MIN (-INTMAX_MAX - 1)
|
||||||
|
|
||||||
|
#define PTRDIFF_MAX __PTRDIFF_MAX__
|
||||||
|
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
|
||||||
|
|
||||||
|
#define SIZE_MAX __SIZE_MAX__
|
||||||
|
|
||||||
|
#define WCHAR_MAX __WCHAR_MAX__
|
||||||
|
#define WCHAR_MIN __WCHAR_MIN__
|
||||||
|
|
||||||
|
#define WINT_MAX __WINT_MAX__
|
||||||
|
#define WINT_MIN __WINT_MIN__
|
||||||
|
|
||||||
|
#endif
|
6
stdnoreturn.h
Normal file
6
stdnoreturn.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef __STDNORETURN_H__
|
||||||
|
#define __STDNORETURN_H__
|
||||||
|
|
||||||
|
#define noreturn _Noreturn
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user