summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorJoão Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>2020-03-05 17:31:57 -0300
committerJoão Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>2020-04-01 18:24:51 -0300
commit641a58ebba2c7205906887f8967f3fceca1d4727 (patch)
tree5758fad7bbbde8a2d825b0041551457322636528 /src/lib/evil
parente596cc2e3171d5a000fe57e18c9a96225ff665be (diff)
windows: Ignore some warnings and add unistd, pthread and time.h.
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/unposix/pthread.h28
-rw-r--r--src/lib/evil/unposix/semaphore.h17
-rw-r--r--src/lib/evil/unposix/sys/time.h12
-rw-r--r--src/lib/evil/unposix/unistd.h6
4 files changed, 63 insertions, 0 deletions
diff --git a/src/lib/evil/unposix/pthread.h b/src/lib/evil/unposix/pthread.h
new file mode 100644
index 0000000000..d1a5e6fc36
--- /dev/null
+++ b/src/lib/evil/unposix/pthread.h
@@ -0,0 +1,28 @@
1#ifndef PTHREAD_H
2#define PTHREAD_H
3
4struct pthread_key_t { int x; };
5
6typedef struct pthread_key_t pthread_key_t;
7
8typedef struct { int x; } sem_t;
9
10struct pthread_mutex_t { int x; };
11
12typedef struct pthread_mutex_t pthread_mutex_t;
13
14struct pthread_cond_t { int x; };
15
16typedef struct pthread_cond_t pthread_cond_t;
17
18struct pthread_rwlock_t { int x; };
19
20typedef struct pthread_rwlock_t pthread_rwlock_t;
21
22/* struct pthread_t { int x; }; */
23
24/* typedef struct pthread_t pthread_t; */
25
26typedef unsigned long long pthread_t;
27
28#endif
diff --git a/src/lib/evil/unposix/semaphore.h b/src/lib/evil/unposix/semaphore.h
new file mode 100644
index 0000000000..58a54bdfb6
--- /dev/null
+++ b/src/lib/evil/unposix/semaphore.h
@@ -0,0 +1,17 @@
1#ifndef SEMAPHORE_H
2#define SEMAPHORE_H
3
4int sem_close(sem_t *);
5int sem_destroy(sem_t *);
6int sem_getvalue(sem_t *restrict, int *restrict);
7int sem_init(sem_t *, int, unsigned);
8sem_t *sem_open(const char *, int, ...);
9int sem_post(sem_t *);
10int sem_timedwait(sem_t *restrict, const struct timespec *restrict);
11int sem_trywait(sem_t *);
12int sem_unlink(const char *);
13int sem_wait(sem_t *);
14
15
16#endif
17
diff --git a/src/lib/evil/unposix/sys/time.h b/src/lib/evil/unposix/sys/time.h
new file mode 100644
index 0000000000..3ad9c97d28
--- /dev/null
+++ b/src/lib/evil/unposix/sys/time.h
@@ -0,0 +1,12 @@
1#ifndef TIME_H
2#define TIME_H
3
4//typedef long time_t;
5
6typedef long suseconds_t;
7
8typedef struct timeval timeval;
9
10int gettimeofday(timeval* a, void* b);
11
12#endif
diff --git a/src/lib/evil/unposix/unistd.h b/src/lib/evil/unposix/unistd.h
new file mode 100644
index 0000000000..0968eee8f1
--- /dev/null
+++ b/src/lib/evil/unposix/unistd.h
@@ -0,0 +1,6 @@
1#ifndef UNISTD_H
2#define UNISTD_H
3
4#include <evil_unistd.h>
5
6#endif