Correct merge issue with libco
Don't invoke uname on Windows targets [Alcaro]
This commit is contained in:
byuu 2019-12-02 19:45:14 +09:00
parent 0d6a02168b
commit 1c7e6c58c3
5 changed files with 17 additions and 9 deletions

View File

@ -5,8 +5,10 @@
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/mman.h>
#ifdef LIBCO_MPROTECT
#include <unistd.h>
#include <sys/mman.h>
#endif
#ifdef __cplusplus
extern "C" {

View File

@ -98,8 +98,10 @@ static void (*co_swap)(cothread_t, cothread_t) = 0;
0xff, 0xe0, /* jmp rax */
};
#include <unistd.h>
#include <sys/mman.h>
#ifdef LIBCO_MPROTECT
#include <unistd.h>
#include <sys/mman.h>
#endif
static void co_init() {
#ifdef LIBCO_MPROTECT

6
arm.c
View File

@ -4,8 +4,10 @@
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#ifdef LIBCO_MPROTECT
#include <unistd.h>
#include <sys/mman.h>
#endif
#ifdef __cplusplus
extern "C" {

2
ppc.c
View File

@ -8,7 +8,7 @@
#include <stdint.h>
#include <string.h>
#if LIBCO_MPROTECT
#ifdef LIBCO_MPROTECT
#include <unistd.h>
#include <sys/mman.h>
#endif

6
x86.c
View File

@ -52,8 +52,10 @@ static const unsigned char co_swap_function[4096] = {
#endif
}
#else
#include <unistd.h>
#include <sys/mman.h>
#ifdef LIBCO_MPROTECT
#include <unistd.h>
#include <sys/mman.h>
#endif
static void co_init() {
#ifdef LIBCO_MPROTECT