move wchar_t to stddef header

This commit is contained in:
auronandace
2026-05-12 11:09:23 +01:00
parent aaaabaded3
commit 3d16b8a1b8
2 changed files with 14 additions and 11 deletions
+13
View File
@@ -1,6 +1,19 @@
#ifndef _STDDEF_H
#define _STDDEF_H
#include <stdint.h>
// wchar_t should come before NULL and size_t
// according to comment in wchar cbindgen
#ifndef _WCHAR_T
#define _WCHAR_T
#ifndef __cplusplus
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int32_t
#endif
typedef __WCHAR_TYPE__ wchar_t;
#endif // __cplusplus
#endif // _WCHAR_T
#include <bits/size-t.h>
#define NULL 0
+1 -11
View File
@@ -4,19 +4,9 @@ sys_includes = [
"features.h",
]
after_includes = """
// int32_t, uint32_t, WCHAR_MIN, WCHAR_MAX
// uint32_t, WCHAR_MIN, WCHAR_MAX
#include <stdint.h>
#ifndef _WCHAR_T
#define _WCHAR_T
#ifndef __cplusplus
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int32_t
#endif
typedef __WCHAR_TYPE__ wchar_t;
#endif // __cplusplus
#endif // _WCHAR_T
#ifndef _WINT_T
#define _WINT_T
#ifndef __WINT_TYPE__