X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fevent.h;h=7adaf85e546d2cdb08bf38ae69d3d56358c53004;hb=f8190b7233871b5b47c3fc8846731d1bbdef78a5;hp=d0129d0ce8ee54f7b613100379d24e4c94ea6854;hpb=6bc5d626a8726fc23365ee705761a3c666a08ad4;p=tinc diff --git a/src/event.h b/src/event.h index d0129d0c..7adaf85e 100644 --- a/src/event.h +++ b/src/event.h @@ -1,6 +1,9 @@ +#ifndef TINC_EVENT_H +#define TINC_EVENT_H + /* event.h -- I/O, timeout and signal event handling - Copyright (C) 2012 Guus Sliepen + Copyright (C) 2012-2013 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +20,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __TINC_EVENT_H__ -#define __TINC_EVENT_H__ - #include "splay_tree.h" #define IO_READ 1 @@ -32,6 +32,9 @@ typedef void (*signal_cb_t)(void *data); typedef struct io_t { int fd; int flags; +#ifdef HAVE_MINGW + WSAEVENT event; +#endif io_cb_t cb; void *data; splay_node_t node; @@ -54,6 +57,9 @@ typedef struct signal_t { extern struct timeval now; extern void io_add(io_t *io, io_cb_t cb, void *data, int fd, int flags); +#ifdef HAVE_MINGW +extern void io_add_event(io_t *io, io_cb_t cb, void *data, WSAEVENT event); +#endif extern void io_del(io_t *io); extern void io_set(io_t *io, int flags);