Merge branch 'wchar-bits' into 'master'

move wchar bits to cbindgen

See merge request redox-os/relibc!1142
This commit is contained in:
Jeremy Soller
2026-03-29 15:32:18 -06:00
3 changed files with 31 additions and 37 deletions
-32
View File
@@ -1,32 +0,0 @@
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H
// int32_t, 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__
#define __WINT_TYPE__ uint32_t
#endif
typedef __WINT_TYPE__ wint_t;
#endif // _WINT_T
// NULL, size_t, must come after wchar_t and wint_t
#define __need_size_t
#define __need_NULL
#include <stddef.h>
#define WEOF (0xffffffffu)
#endif /* _BITS_WCHAR_H */
+2 -2
View File
@@ -4,8 +4,8 @@
# - "The <inttypes.h> header shall include the <stdint.h> header."
# - "wchar_t As described in <stddef.h>."
#
# bits/wchar.h brings in both stdint.h and stddef.h
sys_includes = ["bits/wchar.h"]
# wchar.h brings in both stdint.h and stddef.h
sys_includes = ["wchar.h"]
include_guard = "_RELIBC_INTTYPES_H"
trailer = "#include <bits/inttypes.h>"
language = "C"
+29 -3
View File
@@ -1,11 +1,37 @@
sys_includes = [
"stddef.h",
"stdint.h",
"stdio.h",
"time.h",
"bits/wchar.h",
"features.h",
]
after_includes = """
// int32_t, 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__
#define __WINT_TYPE__ uint32_t
#endif
typedef __WINT_TYPE__ wint_t;
#endif // _WINT_T
// NULL, size_t, must come after wchar_t and wint_t
#define __need_size_t
#define __need_NULL
#include <stddef.h>
#define WEOF (0xffffffffu)
"""
include_guard = "_RELIBC_WCHAR_H"
language = "C"
style = "Type"