Skip to content

Commit 4a3bcba

Browse files
committed
Incorporate feedback
1 parent 4bb13ba commit 4a3bcba

File tree

4 files changed

+10
-41
lines changed

4 files changed

+10
-41
lines changed

system/lib/libc/musl/arch/emscripten/bits/alltypes.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,11 @@
99
#define __BYTE_ORDER 1234
1010
#define __LONG_MAX __LONG_MAX__
1111

12-
#ifndef __cplusplus
13-
#ifdef __WCHAR_TYPE__
1412
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
1513
typedef __WCHAR_TYPE__ wchar_t;
1614
#define __DEFINED_wchar_t
1715
#endif
1816

19-
#else
20-
#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
21-
typedef long wchar_t;
22-
#define __DEFINED_wchar_t
23-
#endif
24-
25-
#endif
26-
#endif
2717
#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
2818
typedef __WINT_TYPE__ wint_t;
2919
#define __DEFINED_wint_t
@@ -72,7 +62,6 @@ typedef unsigned int wctype_t;
7262
#endif
7363

7464

75-
#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0
7665
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
7766
typedef float float_t;
7867
#define __DEFINED_float_t
@@ -83,18 +72,6 @@ typedef double double_t;
8372
#define __DEFINED_double_t
8473
#endif
8574

86-
#else
87-
#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
88-
typedef long double float_t;
89-
#define __DEFINED_float_t
90-
#endif
91-
92-
#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
93-
typedef long double double_t;
94-
#define __DEFINED_double_t
95-
#endif
96-
97-
#endif
9875

9976
#ifndef __cplusplus
10077
#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)

system/lib/libc/musl/arch/emscripten/bits/alltypes.h.in

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
#define __BYTE_ORDER 1234
1010
#define __LONG_MAX __LONG_MAX__
1111

12-
#ifndef __cplusplus
13-
#ifdef __WCHAR_TYPE__
1412
TYPEDEF __WCHAR_TYPE__ wchar_t;
15-
#else
16-
TYPEDEF long wchar_t;
17-
#endif
18-
#endif
1913
TYPEDEF __WINT_TYPE__ wint_t;
2014

2115
// XXX EMSCRIPTEN: ensure it's always 32-bits even in wasm64
@@ -28,13 +22,8 @@ TYPEDEF int suseconds_t;
2822
TYPEDEF unsigned int fsfilcnt_t;
2923
TYPEDEF unsigned int wctype_t;
3024

31-
#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 0
3225
TYPEDEF float float_t;
3326
TYPEDEF double double_t;
34-
#else
35-
TYPEDEF long double float_t;
36-
TYPEDEF long double double_t;
37-
#endif
3827

3928
#ifndef __cplusplus
4029
TYPEDEF struct { _Alignas(8) long long __ll; long double __ld; } max_align_t;

system/lib/libc/musl/arch/emscripten/bits/update_alltypes.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

system/lib/libc/update_alltypes.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
# This script updates alltypes.h based on the contents of alltypes.h.in.
3+
# In upstream this must be done by the top level Makefile.
4+
5+
musl_srcdir="$PWD/musl"
6+
musl_includedir="$musl_srcdir/include"
7+
emscripten_dir="$musl_srcdir/arch/emscripten/bits"
8+
sed -f $musl_srcdir/tools/mkalltypes.sed \
9+
$emscripten_dir/alltypes.h.in \
10+
$musl_includedir/alltypes.h.in > $emscripten_dir/alltypes.h

0 commit comments

Comments
 (0)