move wchar_t to stddef header
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user