Skip to content

Commit c3aabee

Browse files
committed
Fix type definitions of size_t and wchar_t in the built-in stddef.h
1 parent a7eb834 commit c3aabee

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/cxx/include/stddef.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@
1010

1111
#ifdef __need_ptrdiff_t
1212
#undef __need_ptrdiff_t
13-
typedef long int ptrdiff_t;
13+
typedef __PTRDIFF_TYPE__ ptrdiff_t;
1414
#endif /* __need_ptrdiff_t */
1515

1616
#ifdef __need_size_t
1717
#undef __need_size_t
18-
typedef long unsigned int size_t;
18+
typedef __SIZE_TYPE__ size_t;
1919
#endif /* __need_size_t */
2020

2121
#ifdef __need_wchar_t
2222
#undef __need_wchar_t
23+
typedef __WCHAR_TYPE__ wchar_t;
2324
#endif /* __need_wchar_t */
2425

2526
#ifdef __need_NULL

tests/unit_tests/parser/c_stdlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %cxx -toolchain wasm32 -verify %s
1+
// RUN: %cxx -toolchain wasm32 -verify -fcheck %s
22

33
#include <assert.h>
44
#include <complex.h>

0 commit comments

Comments
 (0)