]> git.proxmox.com Git - wasi-libc.git/commitdiff
Don't install <ucontext.h> or <sys/ucontext.h> for WASI.
authorDan Gohman <sunfish@mozilla.com>
Fri, 5 Apr 2019 22:48:36 +0000 (15:48 -0700)
committerDan Gohman <sunfish@mozilla.com>
Thu, 11 Apr 2019 17:46:23 +0000 (10:46 -0700)
WASI doesn't support `getcontext`, `setcontext`, or related functions.

Makefile
expected/wasm32-wasi/include-all.c
expected/wasm32-wasi/predefined-macros.txt
libc-top-half/musl/include/signal.h

index f8f2c0626ddd1583e13853a52bb7030a20bf132a..93d86b8d330f391262dc2a941a564cfc6f248952 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -365,7 +365,9 @@ $(SYSROOT_INC):
              "$(SYSROOT_INC)/ulimit.h" \
              "$(SYSROOT_INC)/xattr.h" \
              "$(SYSROOT_INC)/wordexp.h" \
-             "$(SYSROOT_INC)/spawn.h"
+             "$(SYSROOT_INC)/spawn.h" \
+             "$(SYSROOT_INC)/ucontext.h" \
+             "$(SYSROOT_INC)/sys/ucontext.h"
 
 ifeq ($(BUILD_LIBC_BOTTOM_HALF),no)
 override CRT_SOURCES = $(BASICS_CRT_SOURCES)
index 62760dd2d2dbf9a5fc47ea8805fd1bfb605ca26a..13f99aeb41485fa2ece2f479053c086b42044452 100644 (file)
 #include <sys/timex.h>
 #include <sys/ttydefaults.h>
 #include <sys/types.h>
-#include <sys/ucontext.h>
 #include <sys/uio.h>
 #include <sys/un.h>
 #include <sys/utsname.h>
 #include <threads.h>
 #include <time.h>
 #include <uchar.h>
-#include <ucontext.h>
 #include <unistd.h>
 #include <utime.h>
 #include <values.h>
index cd4081bb9bdd1e17b7dc40898b18518808418ed9..002b9351bceba567d07391d587da4c614e3d3c65 100644 (file)
 #define ND_ROUTER_SOLICIT 133
 #define NEW_ENV_VALUE 1
 #define NEW_ENV_VAR 0
-#define NGREG (sizeof(gregset_t)/sizeof(greg_t))
 #define NGROUPS 32
 #define NGROUPS_MAX 32
 #define NL0 0000000
 #define _THREADS_H 
 #define _TIME_H 
 #define _UCHAR_H 
-#define _UCONTEXT_H 
 #define _UNISTD_H 
 #define _UTIME_H 
 #define _VALUES_H 
index be50de0eee5bdc27421a583d412794dab9838cc5..482e1f7cce8703684a323186917ad43b5ddcd2d4 100644 (file)
@@ -11,9 +11,11 @@ extern "C" {
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
  || defined(_BSD_SOURCE)
 
+#ifdef __wasilibc_unmodified_upstream /* WASI has no ucontext support */
 #ifdef _GNU_SOURCE
 #define __ucontext ucontext
 #endif
+#endif
 
 #define __NEED_size_t
 #define __NEED_pid_t