Skip to content
Snippets Groups Projects
Verified Commit 51c93c4b authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Cleanup of wchar_t and wint_t definitions

parent 42663641
No related branches found
No related tags found
No related merge requests found
#ifndef _BITS_WCHAR_H #ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H #define _BITS_WCHAR_H
#define WEOF (0xffffffffu) // NULL, size_t
#define WCHAR_MIN (0)
#define WCHAR_MAX (0x7fffffff)
#define __need_size_t #define __need_size_t
#define __need_wchar_t
#define __need_wint_t
#define __need_NULL #define __need_NULL
#include <stddef.h>
// int32_t, uint32_t, WCHAR_MIN, WCHAR_MAX
#include <stdint.h> #include <stdint.h>
#define WEOF (0xffffffffu)
typedef int32_t wchar_t;
typedef uint32_t wint_t;
int wprintf(const wchar_t * fmt, ...); int wprintf(const wchar_t * fmt, ...);
int fwprintf(FILE * stream, const wchar_t * fmt, ...); int fwprintf(FILE * stream, const wchar_t * fmt, ...);
int swprintf(wchar_t *s, size_t n, const wchar_t * fmt, ...); int swprintf(wchar_t *s, size_t n, const wchar_t * fmt, ...);
......
#ifndef _BITS_WCTYPE_H
#define _BITS_WCTYPE_H
#define __need_wint_t
#include <stdint.h>
#endif /* _BITS_WCTYPE_H */
...@@ -9,12 +9,6 @@ ...@@ -9,12 +9,6 @@
#endif #endif
typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef __cplusplus
typedef int32_t wchar_t;
#endif /* #ifndef __cplusplus */
typedef uint32_t wint_t;
typedef long unsigned int size_t; typedef long unsigned int size_t;
typedef struct { long long __ll; long double __ld; } max_align_t; typedef struct { long long __ll; long double __ld; } max_align_t;
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
typedef struct FILE FILE; typedef struct FILE FILE;
#include <bits/wchar.h>
int vwprintf(const wchar_t * fmt, va_list ap); int vwprintf(const wchar_t * fmt, va_list ap);
int wprintf(const wchar_t * fmt, ...) { int wprintf(const wchar_t * fmt, ...) {
......
sys_includes = ["stddef.h", "alloca.h"] sys_includes = ["stddef.h", "alloca.h", "wchar.h"]
include_guard = "_RELIBC_STDLIB_H" include_guard = "_RELIBC_STDLIB_H"
trailer = "#include <bits/stdlib.h>" trailer = "#include <bits/stdlib.h>"
language = "C" language = "C"
......
sys_includes = ["stddef.h", "stdint.h", "time.h", "stdio.h" ] sys_includes = ["stddef.h", "stdint.h", "stdio.h", "time.h", "bits/wchar.h"]
include_guard = "_RELIBC_WCHAR_H" include_guard = "_RELIBC_WCHAR_H"
trailer = "#include <bits/wchar.h>"
language = "C" language = "C"
style = "Type" style = "Type"
no_includes = true no_includes = true
......
sys_includes = ["wchar.h" ] sys_includes = ["wchar.h" ]
include_guard = "_RELIBC_WCTYPE_H" include_guard = "_RELIBC_WCTYPE_H"
header = "#include <bits/wctype.h>"
language = "C" language = "C"
style = "Type" style = "Type"
no_includes = true no_includes = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment