Skip to content

Commit bba4dd6

Browse files
Replace implementation of warn*/err*.
This eliminates a large number of warnings about incompatible function pointer casts when compiling for asm.js.
1 parent a15486f commit bba4dd6

File tree

11 files changed

+78
-432
lines changed

11 files changed

+78
-432
lines changed

emcc

+3-8
Original file line numberDiff line numberDiff line change
@@ -1441,20 +1441,15 @@ try:
14411441
'dlmalloc.c',
14421442
os.path.join('libcxx', 'new.cpp'),
14431443
os.path.join('libc', 'stdlib', 'getopt_long.c'),
1444-
os.path.join('libc', 'gen', 'err.c'),
1445-
os.path.join('libc', 'gen', 'errx.c'),
1446-
os.path.join('libc', 'gen', 'warn.c'),
1447-
os.path.join('libc', 'gen', 'warnx.c'),
1448-
os.path.join('libc', 'gen', 'verr.c'),
1449-
os.path.join('libc', 'gen', 'verrx.c'),
1450-
os.path.join('libc', 'gen', 'vwarn.c'),
1451-
os.path.join('libc', 'gen', 'vwarnx.c'),
14521444
]
14531445
musl_files = [
14541446
['internal', [
14551447
'floatscan.c',
14561448
'shgetc.c',
14571449
]],
1450+
['legacy', [
1451+
'err.c',
1452+
]],
14581453
['math', [
14591454
'scalbn.c',
14601455
'scalbnl.c',

system/lib/libc.symbols

+8-16
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,11 @@
4949
T __toread
5050
T __towrite
5151
T __uflow
52-
T _err
53-
T _errx
54-
T _verr
55-
T _verrx
56-
T _vwarn
57-
T _vwarnx
58-
T _warn
59-
T _warnx
6052
T atof
6153
W bulk_free
6254
W calloc
63-
W err
64-
W errx
55+
T err
56+
T errx
6557
W free
6658
T getopt
6759
T getopt_long
@@ -97,9 +89,9 @@
9789
T strtold
9890
W strtold_l
9991
W valloc
100-
W verr
101-
W verrx
102-
W vwarn
103-
W vwarnx
104-
W warn
105-
W warnx
92+
T verr
93+
T verrx
94+
T vwarn
95+
T vwarnx
96+
T warn
97+
T warnx

system/lib/libc/gen/err.c

-49
This file was deleted.

system/lib/libc/gen/errx.c

-49
This file was deleted.

system/lib/libc/gen/verr.c

-58
This file was deleted.

system/lib/libc/gen/verrx.c

-51
This file was deleted.

system/lib/libc/gen/vwarn.c

-55
This file was deleted.

system/lib/libc/gen/vwarnx.c

-48
This file was deleted.

0 commit comments

Comments
 (0)