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

Ensure wchar_t and wint_t definitions can coexist with GCC stddef.h

parent 51c93c4b
No related branches found
No related tags found
No related merge requests found
#ifndef _BITS_WCHAR_H
#define _BITS_WCHAR_H
// NULL, size_t
// int32_t, uint32_t, WCHAR_MIN, WCHAR_MAX
#include <stdint.h>
#ifndef _WCHAR_T
#define _WCHAR_T
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int32_t
#endif
typedef __WCHAR_TYPE__ wchar_t;
#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>
// int32_t, uint32_t, WCHAR_MIN, WCHAR_MAX
#include <stdint.h>
#define WEOF (0xffffffffu)
typedef int32_t wchar_t;
typedef uint32_t wint_t;
int wprintf(const wchar_t * fmt, ...);
int fwprintf(FILE * stream, const wchar_t * fmt, ...);
int swprintf(wchar_t *s, size_t n, const wchar_t * fmt, ...);
......
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