aboutsummaryrefslogtreecommitdiffstats
path: root/python/gevent/libev/libev.h
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-09-14 19:32:27 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-09-14 19:32:27 -0700
commit4212164e91ba2f49583cf44ad623a29b36db8f77 (patch)
tree47aefe3c0162f03e0c823b43873356f69c1cd636 /python/gevent/libev/libev.h
parent6ca20ff7010f2bafc7fefcb8cad982be27a8aeae (diff)
downloadyt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.tar.lz
yt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.tar.xz
yt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.zip
Windows: Use 32-bit distribution of python
Diffstat (limited to 'python/gevent/libev/libev.h')
-rw-r--r--python/gevent/libev/libev.h42
1 files changed, 38 insertions, 4 deletions
diff --git a/python/gevent/libev/libev.h b/python/gevent/libev/libev.h
index 657aaad..66959d9 100644
--- a/python/gevent/libev/libev.h
+++ b/python/gevent/libev/libev.h
@@ -1,13 +1,42 @@
#if defined(LIBEV_EMBED)
#include "ev.c"
+#undef LIBEV_EMBED
+#define LIBEV_EMBED 1
+#define gevent_ev_loop_origflags(loop) ((loop)->origflags)
+#define gevent_ev_loop_sig_pending(loop) ((loop))->sig_pending
+#define gevent_ev_loop_backend_fd(loop) ((loop))->backend_fd
+#define gevent_ev_loop_activecnt(loop) ((loop))->activecnt
+#if EV_USE_SIGNALFD
+#define gevent_ev_loop_sigfd(loop) ((loop))->sigfd
#else
+#define gevent_ev_loop_sigfd(loop) -1
+#endif /* !EV_USE_SIGNALFD */
+#else /* !LIBEV_EMBED */
#include "ev.h"
+#define gevent_ev_loop_origflags(loop) -1
+#define gevent_ev_loop_sig_pending(loop) -1
+#define gevent_ev_loop_backend_fd(loop) -1
+#define gevent_ev_loop_activecnt(loop) -1
+#define gevent_ev_loop_sigfd(loop) -1
+
+#define LIBEV_EMBED 0
+#define EV_USE_FLOOR -1
+#define EV_USE_CLOCK_SYSCALL -1
+#define EV_USE_REALTIME -1
+#define EV_USE_MONOTONIC -1
+#define EV_USE_NANOSLEEP -1
+#define EV_USE_INOTIFY -1
+#define EV_USE_SIGNALFD -1
+#define EV_USE_EVENTFD -1
+#define EV_USE_4HEAP -1
+
+
#ifndef _WIN32
#include <signal.h>
-#endif
+#endif /* !_WIN32 */
-#endif
+#endif /* LIBEV_EMBED */
#ifndef _WIN32
@@ -58,9 +87,14 @@ static void gevent_reset_sigchld_handler(void) {
}
}
-#else
+#else /* !_WIN32 */
#define gevent_ev_default_loop ev_default_loop
static void gevent_install_sigchld_handler(void) { }
+static void gevent_reset_sigchld_handler(void) { }
+
+// Fake child functions that we can link to.
+static void ev_child_start(struct ev_loop* loop, ev_child* w) {};
+static void ev_child_stop(struct ev_loop* loop, ev_child* w) {};
-#endif
+#endif /* _WIN32 */