Skip to content

Commit 5d13ad6

Browse files
committed
move wchar_t typedef into <cdefs.h>
1 parent 779d7ed commit 5d13ad6

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/libc/include/__wchar_def.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33

44
#include <cdefs.h>
55

6-
#ifndef _WCHAR_T_DEFINED
7-
#define _WCHAR_T_DEFINED
8-
#ifndef __cplusplus
9-
typedef __WCHAR_TYPE__ wchar_t;
10-
#endif /* __cplusplus */
11-
#endif /* _WCHAR_T_DEFINED */
12-
136
#ifndef _WINT_T_DEFINED
147
#define _WINT_T_DEFINED
158
typedef __WINT_TYPE__ wint_t;

src/libc/include/cdefs.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,16 @@
3636
# endif /* __cplusplus */
3737
#endif /* NULL */
3838

39-
#ifndef SIZE_T_DEFINED
40-
#define SIZE_T_DEFINED
39+
#ifndef _SIZE_T_DEFINED
40+
#define _SIZE_T_DEFINED
4141
typedef __SIZE_TYPE__ size_t;
42-
#endif /* SIZE_T_DEFINED */
42+
#endif /* _SIZE_T_DEFINED */
43+
44+
#ifndef _WCHAR_T_DEFINED
45+
#define _WCHAR_T_DEFINED
46+
#ifndef __cplusplus
47+
typedef __WCHAR_TYPE__ wchar_t;
48+
#endif /* __cplusplus */
49+
#endif /* _WCHAR_T_DEFINED */
4350

4451
#endif /* _CDEFS_H */

0 commit comments

Comments
 (0)