Skip to content

Commit bd15116

Browse files
committed
optimize
1 parent 8b57723 commit bd15116

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/shared/platform/include/platform_wasi_types.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@
2020
/* clang-format off */
2121

2222
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
2326
#ifndef _Static_assert
2427
#define _Static_assert static_assert
2528
#endif /* _Static_assert */
2629

2730
#ifndef _Alignof
28-
#define _Alignof alignof
29-
#endif /* _Alignof */
30-
31-
extern "C" {
32-
#elif defined(_MSC_VER) && !_CRT_HAS_C11
33-
#define _Static_assert static_assert
31+
#if defined(_MSC_VER) && !_CRT_HAS_C11
3432
#define _Alignof __alignof
33+
#else
34+
#define _Alignof alignof
3535
#endif
36+
#endif /* _Alignof */
3637

3738
/* There is no need to check the WASI layout if we're using uvwasi or libc-wasi
3839
* is not enabled at all. */

0 commit comments

Comments
 (0)