diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 21:31:07 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-25 21:31:07 -0700 |
commit | 57c012482aed42154a0cad98c7b3a65363f4d276 (patch) | |
tree | 325dcde7e9fdfbae2bb21fb5165c392a118f03ef | |
parent | 989ef1a194dfab120b73d434ff7738a9038bcdc6 (diff) |
header fixes and additions
-rw-r--r-- | system/include/libc/pthread.h | 2 | ||||
-rw-r--r-- | system/include/libc/sched.h | 2 | ||||
-rw-r--r-- | system/include/libc/stdlib.h | 2 | ||||
-rw-r--r-- | system/include/libc/sys/types.h | 2 | ||||
-rw-r--r-- | system/include/libcxx/__locale | 2 | ||||
-rw-r--r-- | system/include/libcxx/mutex | 1 |
6 files changed, 6 insertions, 5 deletions
diff --git a/system/include/libc/pthread.h b/system/include/libc/pthread.h index 2e95121b..8f845937 100644 --- a/system/include/libc/pthread.h +++ b/system/include/libc/pthread.h @@ -27,7 +27,7 @@ extern "C" { #include <unistd.h> -#if defined(_POSIX_THREADS) +#if defined(_POSIX_THREADS) || defined(EMSCRIPTEN) #include <sys/types.h> #include <time.h> diff --git a/system/include/libc/sched.h b/system/include/libc/sched.h index a3f58ac9..13586878 100644 --- a/system/include/libc/sched.h +++ b/system/include/libc/sched.h @@ -81,7 +81,7 @@ int sched_rr_get_interval( ); #endif /* _POSIX_PRIORITY_SCHEDULING */ -#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) +#if defined(_POSIX_THREADS) || defined(_POSIX_PRIORITY_SCHEDULING) || defined(EMSCRIPTEN) /* * XBD 13 - Yield Processor, P1003.1b-2008, p. 1807 diff --git a/system/include/libc/stdlib.h b/system/include/libc/stdlib.h index 0bd2c7d7..1019af0f 100644 --- a/system/include/libc/stdlib.h +++ b/system/include/libc/stdlib.h @@ -216,7 +216,7 @@ int _EXFUN(_system_r,(struct _reent *, const char *)); _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *)); /* On platforms where long double equals double. */ -#ifdef _LDBL_EQ_DBL +#if defined(_LDBL_EQ_DBL) || defined(EMSCRIPTEN) extern long double strtold (const char *, char **); extern long double wcstold (const wchar_t *, wchar_t **); #endif /* _LDBL_EQ_DBL */ diff --git a/system/include/libc/sys/types.h b/system/include/libc/sys/types.h index 70835735..6a5c11a9 100644 --- a/system/include/libc/sys/types.h +++ b/system/include/libc/sys/types.h @@ -272,7 +272,7 @@ typedef long suseconds_t; * This means that we don't use the types defined here, but rather in * <cygwin/types.h> */ -#if defined(_POSIX_THREADS) && !defined(__CYGWIN__) +#if defined(_POSIX_THREADS) && !defined(__CYGWIN__) || defined(EMSCRIPTEN) #include <sys/sched.h> diff --git a/system/include/libcxx/__locale b/system/include/libcxx/__locale index 42c9c5ae..5cd9e024 100644 --- a/system/include/libcxx/__locale +++ b/system/include/libcxx/__locale @@ -22,7 +22,7 @@ #if _WIN32 # include <support/win32/locale.h> #else // _WIN32 -# include <xlocale.h> +/* XXX EMSCRIPTEN # include <xlocale.h> */ #endif // _WIN32 #pragma GCC system_header diff --git a/system/include/libcxx/mutex b/system/include/libcxx/mutex index 297baca5..b79201a5 100644 --- a/system/include/libcxx/mutex +++ b/system/include/libcxx/mutex @@ -178,6 +178,7 @@ template<class Callable, class ...Args> #ifndef _LIBCPP_HAS_NO_VARIADICS #include <tuple> #endif +#include "sched.h" /* XXX Emscripten */ #pragma GCC system_header |