mirror of
https://github.com/mintsuki/freestanding-headers
synced 2024-11-22 04:21:20 +03:00
Misc std related updates
This commit is contained in:
parent
f569ce1059
commit
b28fd30353
4
stdarg.h
4
stdarg.h
@ -11,7 +11,9 @@ 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)
|
||||
#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
|
||||
# define va_copy(d, s) __builtin_va_copy(d, s)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
13
stddef.h
13
stddef.h
@ -8,12 +8,16 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef __WCHAR_TYPE__ wchar_t;
|
||||
|
||||
/* XXX fix to use proper __STDC_VERSION__ number later on */
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202000L)
|
||||
typedef typeof(nullptr) nullptr_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef decltype(nullptr) nullptr_t;
|
||||
|
||||
enum class byte : unsigned char {};
|
||||
#endif
|
||||
|
||||
#ifndef __STDDEF_H_MACROS
|
||||
@ -31,6 +35,11 @@ enum class byte : unsigned char {};
|
||||
|
||||
#define offsetof(s, m) __builtin_offsetof(s, m)
|
||||
|
||||
/* XXX fix to use proper __STDC_VERSION__ number later on */
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202000L)
|
||||
# define unreachable() __builtin_unreachable()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user