diff options
Diffstat (limited to 'system/include')
88 files changed, 5424 insertions, 2733 deletions
diff --git a/system/include/SDL/SDL_events.h b/system/include/SDL/SDL_events.h index 804ac57e..8be00ceb 100644 --- a/system/include/SDL/SDL_events.h +++ b/system/include/SDL/SDL_events.h @@ -55,6 +55,7 @@ extern "C" { */ typedef enum { + SDL_NOEVENT = 0, SDL_FIRSTEVENT = 0, /**< Unused (do not remove) */ /* Application events */ diff --git a/system/include/compat/ctype.h b/system/include/compat/ctype.h index 891006d9..3f504946 100644 --- a/system/include/compat/ctype.h +++ b/system/include/compat/ctype.h @@ -14,4 +14,21 @@ #include_next <ctype.h> +/* We undef these until libcxx is fixed. Without this, + some things can fail to compile correctly, like + Boost. Issue #1716. */ + +#undef isalpha +#undef isblank +#undef iscntrl +#undef isdigit +#undef isgraph +#undef islower +#undef isprint +#undef ispunct +#undef isspace +#undef isupper +#undef isxdigit +#undef isctype + #endif /* _COMPAT_CTYPE_H_ */ diff --git a/system/include/compat/wchar.h b/system/include/compat/wchar.h new file mode 100644 index 00000000..42f0bcee --- /dev/null +++ b/system/include/compat/wchar.h @@ -0,0 +1,23 @@ +#ifndef _COMPAT_WCHAR_H_ +#define _COMPAT_WCHAR_H_ + +#include_next <wchar.h> + +/* We undef these until libcxx is fixed. Without this, + some things can fail to compile correctly, like + Boost. Issue #1716. */ + +#undef iswalpha +#undef iswblank +#undef iswcntrl +#undef iswdigit +#undef iswgraph +#undef iswlower +#undef iswprint +#undef iswpunct +#undef iswspace +#undef iswupper +#undef iswxdigit +#undef iswctype + +#endif /* _COMPAT_WCHAR_H_ */ diff --git a/system/include/compat/wctype.h b/system/include/compat/wctype.h new file mode 100644 index 00000000..0eeaab8b --- /dev/null +++ b/system/include/compat/wctype.h @@ -0,0 +1,23 @@ +#ifndef _COMPAT_WCTYPE_H_ +#define _COMPAT_WCTYPE_H_ + +#include_next <wctype.h> + +/* We undef these until libcxx is fixed. Without this, + some things can fail to compile correctly, like + Boost. Issue #1716. */ + +#undef iswalpha +#undef iswblank +#undef iswcntrl +#undef iswdigit +#undef iswgraph +#undef iswlower +#undef iswprint +#undef iswpunct +#undef iswspace +#undef iswupper +#undef iswxdigit +#undef iswctype + +#endif /* _COMPAT_WCTYPE_H_ */ diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index d30620ec..ddcbc43a 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -24,14 +24,38 @@ extern "C" { * EM_ASM(window.alert('hai')); * * This also works with asm.js, as it outlines the code (it - * does a function call to reach it). + * does a function call to reach it). It supports newlines, * - * Note: double-quotes (") are not supported, but you can use - * single-quotes (') in js anyhow. + * EM_ASM( + * window.alert('hai')); + * window.alert('bai')); + * ) + * + * Notes: Double-quotes (") are not supported, but you can use + * single-quotes (') in js anyhow. + * + * You can't access C variables with EM_ASM, nor receive + * a value back. use EM_ASM_INT or EM_ASM_DOUBLE for that */ #define EM_ASM(...) emscripten_asm_const(#__VA_ARGS__) /* + * Input-output versions of EM_ASM. EM_ASM_INT receives arguments of + * either int or double type and returns an int; EM_ASM_DOUBLE + * receives similar arguments (int or double) but returns a double. + * Arguments arrive as $0, $1 etc; output value should be returned: + * + * int x = EM_ASM_INT({ + * console.log('I received: ' + [$0, $1]); + * return $0 + $1; + * }, calc(), otherCalc()); + * + * Note the {,} + */ +#define EM_ASM_INT(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__) +#define EM_ASM_DOUBLE(code, ...) emscripten_asm_const_double(#code, __VA_ARGS__) + +/* * Forces LLVM to not dead-code-eliminate a function. Note that * you still need to use EXPORTED_FUNCTIONS so it stays alive * in JS, e.g. @@ -203,7 +227,7 @@ void emscripten_get_canvas_size(int *width, int *height, int *isFullscreen); * absolute time, and is only meaningful in comparison to * other calls to this function. The unit is ms. */ -float emscripten_get_now(); +double emscripten_get_now(); /* * Simple random number generation in [0, 1), maps to Math.random(). @@ -420,6 +444,8 @@ void emscripten_jcache_printf_(...); /* internal use */ /* Helper API for EM_ASM - do not call this yourself */ void emscripten_asm_const(const char *code); +int emscripten_asm_const_int(const char *code, ...); +double emscripten_asm_const_double(const char *code, ...); #ifdef __cplusplus } diff --git a/system/include/emscripten/vector.h b/system/include/emscripten/vector.h index ea148f0d..938f2369 100644 --- a/system/include/emscripten/vector.h +++ b/system/include/emscripten/vector.h @@ -4,3 +4,13 @@ typedef float float32x4 __attribute__((__vector_size__(16))); typedef unsigned int uint32x4 __attribute__((__vector_size__(16))); +#ifdef __cplusplus +extern "C" { +#endif + +unsigned int emscripten_float32x4_signmask(float32x4 x); + +#ifdef __cplusplus +} +#endif + diff --git a/system/include/libcxx/CREDITS.TXT b/system/include/libcxx/CREDITS.TXT index 5e4d14ec..368b526f 100644 --- a/system/include/libcxx/CREDITS.TXT +++ b/system/include/libcxx/CREDITS.TXT @@ -31,7 +31,7 @@ D: FreeBSD and Solaris ports, libcxxrt support, some atomics work. N: Marshall Clow E: mclow.lists@gmail.com E: marshall@idio.com -D: Minor patches and bug fixes. +D: C++14 support, patches and bug fixes. N: Bill Fisher E: william.w.fisher@gmail.com @@ -76,6 +76,10 @@ N: Bjorn Reese E: breese@users.sourceforge.net D: Initial regex prototype +N: Nico Rieck +E: nico.rieck@gmail.com +D: Windows fixes + N: Jonathan Sauer D: Minor patches, mostly related to constexpr @@ -105,6 +109,10 @@ N: Zhang Xiongpang E: zhangxiongpang@gmail.com D: Minor patches and bug fixes. +N: Xing Xue +E: xingxue@ca.ibm.com +D: AIX port + N: Zhihao Yuan E: lichray@gmail.com D: Standard compatibility fixes. diff --git a/system/include/libcxx/__bit_reference b/system/include/libcxx/__bit_reference index 857dd5a4..37b79237 100644 --- a/system/include/libcxx/__bit_reference +++ b/system/include/libcxx/__bit_reference @@ -40,7 +40,7 @@ class __bit_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; @@ -82,7 +82,7 @@ class __bit_reference<_Cp, false> }; template <class _Cp> -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT { @@ -92,7 +92,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT } template <class _Cp, class _Dp> -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT { @@ -102,7 +102,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT { @@ -112,7 +112,7 @@ swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT { @@ -130,7 +130,7 @@ class __bit_const_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; @@ -379,7 +379,7 @@ __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) } template <class _Cp> -_LIBCPP_INLINE_VISIBILITY inline +inline _LIBCPP_INLINE_VISIBILITY void fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value_) { @@ -1222,7 +1222,7 @@ private: __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT : __seg_(__s), __ctz_(__ctz) {} -#if defined(__clang__) +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; #else friend class _Cp::__self; diff --git a/system/include/libcxx/__config b/system/include/libcxx/__co |