Skip to content

Commit b7f8cd2

Browse files
committedDec 16, 2014
Add symbol __fpclassifyd as an alias to __fpclassify to satisfy test_python.
1 parent 3974e99 commit b7f8cd2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
 

‎src/library.js

-2
Original file line numberDiff line numberDiff line change
@@ -4531,8 +4531,6 @@ LibraryManager.library = {
45314531
return divt;
45324532
},
45334533

4534-
__fpclassifyd: '__fpclassify', // Needed by tests/python/python.le32.bc
4535-
45364534
// ==========================================================================
45374535
// sys/utsname.h
45384536
// ==========================================================================

‎system/lib/libc/musl/src/math/__fpclassify.c

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <math.h>
22
#include <stdint.h>
33

4+
#ifdef __EMSCRIPTEN__
5+
// XXX Emscripten: for weak_alias.
6+
#include "libc.h"
7+
#endif
8+
49
int __fpclassify(double x)
510
{
611
union {double f; uint64_t i;} u = {x};
@@ -9,3 +14,8 @@ int __fpclassify(double x)
914
if (e==0x7ff) return u.i<<12 ? FP_NAN : FP_INFINITE;
1015
return FP_NORMAL;
1116
}
17+
18+
#ifdef __EMSCRIPTEN__
19+
// XXX Emscripten: Needed by tests/python/python.le32.bc
20+
weak_alias(__fpclassify, __fpclassifyd);
21+
#endif

0 commit comments

Comments
 (0)