projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mingw: fix static linking with recent ncurses
[tinc]
/
src
/
event.c
diff --git
a/src/event.c
b/src/event.c
index
899b62a
..
2710a8b
100644
(file)
--- a/
src/event.c
+++ b/
src/event.c
@@
-25,13
+25,12
@@
#include <sys/epoll.h>
#endif
#include <sys/epoll.h>
#endif
-#include "dropin.h"
#include "event.h"
#include "utils.h"
#include "net.h"
struct timeval now;
#include "event.h"
#include "utils.h"
#include "net.h"
struct timeval now;
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
#ifdef HAVE_SYS_EPOLL_H
static int epollset = 0;
#ifdef HAVE_SYS_EPOLL_H
static int epollset = 0;
@@
-59,7
+58,7
@@
static inline int event_epoll_init(void) {
#endif
static int io_compare(const io_t *a, const io_t *b) {
#endif
static int io_compare(const io_t *a, const io_t *b) {
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
return a->fd - b->fd;
#else
return a->fd - b->fd;
#else
@@
-115,7
+114,7
@@
void io_add(io_t *io, io_cb_t cb, void *data, int fd, int flags) {
}
io->fd = fd;
}
io->fd = fd;
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
if(io->fd != -1) {
io->event = WSACreateEvent();
if(io->fd != -1) {
io->event = WSACreateEvent();
@@
-142,7
+141,7
@@
void io_add(io_t *io, io_cb_t cb, void *data, int fd, int flags) {
#endif
}
#endif
}
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
void io_add_event(io_t *io, io_cb_t cb, void *data, WSAEVENT event) {
io->event = event;
io_add(io, cb, data, -1, 0);
void io_add_event(io_t *io, io_cb_t cb, void *data, WSAEVENT event) {
io->event = event;
io_add(io, cb, data, -1, 0);
@@
-168,7
+167,7
@@
void io_set(io_t *io, int flags) {
return;
}
return;
}
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
#ifdef HAVE_SYS_EPOLL_H
epoll_ctl(epollset, EPOLL_CTL_DEL, io->fd, NULL);
#ifdef HAVE_SYS_EPOLL_H
epoll_ctl(epollset, EPOLL_CTL_DEL, io->fd, NULL);
@@
-231,7
+230,7
@@
void io_del(io_t *io) {
}
io_set(io, 0);
}
io_set(io, 0);
-#ifdef HAVE_
MINGW
+#ifdef HAVE_
WINDOWS
if(io->fd != -1 && WSACloseEvent(io->event) == FALSE) {
abort();
if(io->fd != -1 && WSACloseEvent(io->event) == FALSE) {
abort();
@@
-282,7
+281,7
@@
void timeout_del(timeout_t *timeout) {
};
}
};
}
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
// From Matz's Ruby
#ifndef NSIG
// From Matz's Ruby
#ifndef NSIG
@@
-380,7
+379,7
@@
static struct timeval *timeout_execute(struct timeval *diff) {
bool event_loop(void) {
running = true;
bool event_loop(void) {
running = true;
-#ifndef HAVE_
MINGW
+#ifndef HAVE_
WINDOWS
#ifdef HAVE_SYS_EPOLL_H
#ifdef HAVE_SYS_EPOLL_H