aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libc')
-rw-r--r--system/include/libc/locale.h9
-rw-r--r--system/include/libc/pthread.h4
-rw-r--r--system/include/libc/sys/types.h2
-rw-r--r--system/include/libc/time.h2
4 files changed, 13 insertions, 4 deletions
diff --git a/system/include/libc/locale.h b/system/include/libc/locale.h
index 532faaa5..b75bed7a 100644
--- a/system/include/libc/locale.h
+++ b/system/include/libc/locale.h
@@ -21,6 +21,15 @@
#define LC_TIME 5
#define LC_MESSAGES 6
+/* XXX Emscripten: add masks */
+#define LC_ALL_MASK (1 << LC_ALL)
+#define LC_COLLATE_MASK (1 << LC_COLLATE)
+#define LC_CTYPE_MASK (1 << LC_CTYPE)
+#define LC_MONETARY_MASK (1 << LC_MONETARY)
+#define LC_NUMERIC_MASK (1 << LC_NUMERIC)
+#define LC_TIME_MASK (1 << LC_TIME)
+#define LC_MESSAGES_MASK (1 << LC_MESSAGES)
+
_BEGIN_STD_C
struct lconv
diff --git a/system/include/libc/pthread.h b/system/include/libc/pthread.h
index 63bb6dfa..1185fcc1 100644
--- a/system/include/libc/pthread.h
+++ b/system/include/libc/pthread.h
@@ -31,7 +31,7 @@ extern "C" {
#include <sys/types.h>
#include <time.h>
-#include <sys/sched.h>
+#include <sched.h> /* XXX Emscripten: removed sys/ */
/* Register Fork Handlers */
int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void),
@@ -46,7 +46,7 @@ int _EXFUN(pthread_mutexattr_getpshared,
int _EXFUN(pthread_mutexattr_setpshared,
(pthread_mutexattr_t *__attr, int __pshared));
-#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
+#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) || defined(EMSCRIPTEN)
/* Single UNIX Specification 2 Mutex Attributes types */
diff --git a/system/include/libc/sys/types.h b/system/include/libc/sys/types.h
index 5cb126a7..734004e7 100644
--- a/system/include/libc/sys/types.h
+++ b/system/include/libc/sys/types.h
@@ -300,7 +300,7 @@ typedef __uint32_t pthread_t; /* identify a thread */
#define PTHREAD_CREATE_DETACHED 0
#define PTHREAD_CREATE_JOINABLE 1
-#if defined(__XMK__) || defined(__rtems__)
+#if defined(__XMK__) || defined(__rtems__) || defined(EMSCRIPTEN)
/* The following defines are part of the X/Open System Interface (XSI). */
/* This type of mutex does not detect deadlock. A thread attempting to relock this mutex without first unlocking
diff --git a/system/include/libc/time.h b/system/include/libc/time.h
index 3f167556..83993942 100644
--- a/system/include/libc/time.h
+++ b/system/include/libc/time.h
@@ -229,7 +229,7 @@ extern "C" {
#endif
-#if defined(_POSIX_MONOTONIC_CLOCK)
+#if defined(_POSIX_MONOTONIC_CLOCK) || defined(EMSCRIPTEN)
/* The identifier for the system-wide monotonic clock, which is defined
* as a clock whose value cannot be set via clock_settime() and which