diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 20:50:05 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 20:50:05 -0700 |
commit | 989ef1a194dfab120b73d434ff7738a9038bcdc6 (patch) | |
tree | ca50f18874f93c24898e7caad6bea52aeee0a258 /system/include | |
parent | f75ea0e4774fcb0f5dba220185ac70fadce1d51c (diff) |
header fixes and additions
Diffstat (limited to 'system/include')
-rw-r--r-- | system/include/libc/math.h | 12 | ||||
-rw-r--r-- | system/include/libc/wchar.h | 2 | ||||
-rw-r--r-- | system/include/libcxx/exception | 12 |
3 files changed, 18 insertions, 8 deletions
diff --git a/system/include/libc/math.h b/system/include/libc/math.h index 9e604148..c5c6bdb9 100644 --- a/system/include/libc/math.h +++ b/system/include/libc/math.h @@ -362,7 +362,7 @@ extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ /* On platforms where long double equals double. */ -#ifdef _LDBL_EQ_DBL +#if defined(_LDBL_EQ_DBL) || defined(EMSCRIPTEN) /* Reentrant ANSI C functions. */ #ifndef __math_68881 extern long double atanl _PARAMS((long double)); @@ -379,8 +379,10 @@ extern long double log1pl _PARAMS((long double)); extern long double expm1l _PARAMS((long double)); #endif /* ! defined (__math_68881) */ /* Non reentrant ANSI C functions. */ + #ifndef _REENT_ONLY #ifndef __math_68881 + extern long double acosl _PARAMS((long double)); extern long double asinl _PARAMS((long double)); extern long double atan2l _PARAMS((long double, long double)); @@ -426,6 +428,14 @@ extern long double remainderl _PARAMS((long double, long double)); extern long double lgammal _PARAMS((long double)); extern long double erfl _PARAMS((long double)); extern long double erfcl _PARAMS((long double)); + +/* XXX Emscripten: 5 more */ +extern long double log2l _PARAMS((long double)); +extern long double logbl _PARAMS((long double)); +double nexttoward(double x, long double y); +float nexttowardf(float x, long double y); +long double nexttowardl(long double x, long double y); + #endif /* ! defined (_REENT_ONLY) */ #else /* !_LDBL_EQ_DBL */ #ifdef __i386__ diff --git a/system/include/libc/wchar.h b/system/include/libc/wchar.h index 234c71e0..4331bc79 100644 --- a/system/include/libc/wchar.h +++ b/system/include/libc/wchar.h @@ -177,6 +177,8 @@ int _EXFUN(_vswscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, __VA int _EXFUN(_vwscanf_r, (struct _reent *, const wchar_t *, __VALIST)); int _EXFUN(_wscanf_r, (struct _reent *, const wchar_t *, ...)); +long double _EXFUN(wcstold, (const wchar_t *nptr, wchar_t **endptr)); /* XXX Emscripten */ + #define getwc(fp) fgetwc(fp) #define putwc(wc,fp) fputwc((wc), (fp)) #ifndef _REENT_ONLY diff --git a/system/include/libcxx/exception b/system/include/libcxx/exception index f418575c..5b1db9b6 100644 --- a/system/include/libcxx/exception +++ b/system/include/libcxx/exception @@ -105,19 +105,19 @@ public: typedef void (*unexpected_handler)(); _LIBCPP_VISIBLE unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT; _LIBCPP_VISIBLE unexpected_handler get_unexpected() _NOEXCEPT; -_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void unexpected(); +_LIBCPP_VISIBLE void unexpected(); /* XXX Emscripten: remove _ATTRIBUTE(noreturn), here and two places below */ typedef void (*terminate_handler)(); _LIBCPP_VISIBLE terminate_handler set_terminate(terminate_handler) _NOEXCEPT; _LIBCPP_VISIBLE terminate_handler get_terminate() _NOEXCEPT; -_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void terminate() _NOEXCEPT; +_LIBCPP_VISIBLE void terminate() _NOEXCEPT; _LIBCPP_VISIBLE bool uncaught_exception() _NOEXCEPT; class exception_ptr; exception_ptr current_exception() _NOEXCEPT; -_ATTRIBUTE(noreturn) void rethrow_exception(exception_ptr); +void rethrow_exception(exception_ptr); class _LIBCPP_VISIBLE exception_ptr { @@ -141,7 +141,7 @@ public: {return !(__x == __y);} friend exception_ptr current_exception() _NOEXCEPT; - _ATTRIBUTE(noreturn) friend void rethrow_exception(exception_ptr); + friend void rethrow_exception(exception_ptr); }; template<class _E> @@ -172,7 +172,7 @@ public: virtual ~nested_exception() _NOEXCEPT; // access functions - _ATTRIBUTE(noreturn) void rethrow_nested() const; + void rethrow_nested() const; _LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;} }; @@ -185,7 +185,6 @@ struct __nested }; template <class _Tp> -_ATTRIBUTE(noreturn) void #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested(_Tp&& __t, typename enable_if< @@ -204,7 +203,6 @@ throw_with_nested (_Tp& __t, typename enable_if< } template <class _Tp> -_ATTRIBUTE(noreturn) void #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested(_Tp&& __t, typename enable_if< |