]> granicus.if.org Git - libevent/commitdiff
Put #ifdef around some files to support alternate build systems.
authorRoss Lagerwall <rosslagerwall@gmail.com>
Wed, 8 Feb 2012 16:46:00 +0000 (18:46 +0200)
committerRoss Lagerwall <rosslagerwall@gmail.com>
Wed, 8 Feb 2012 16:46:00 +0000 (18:46 +0200)
devpoll.c
epoll.c
evport.c
kqueue.c
poll.c
select.c

index aeb97ae92c52d610428b7a30c31e75e6b4b65063..628af7cb4f05be7e63fbf1a4a5708bdfea16ff48 100644 (file)
--- a/devpoll.c
+++ b/devpoll.c
@@ -27,6 +27,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_DEVPOLL
+
 #include <sys/types.h>
 #include <sys/resource.h>
 #ifdef _EVENT_HAVE_SYS_TIME_H
@@ -305,3 +307,5 @@ devpoll_dealloc(struct event_base *base)
        memset(devpollop, 0, sizeof(struct devpollop));
        mm_free(devpollop);
 }
+
+#endif /* _EVENT_HAVE_DEVPOLL */
diff --git a/epoll.c b/epoll.c
index f1219e7dfb6982c9a6fffb8a235ff0e00faf8760..6829076a575b88db9357c61a32ed607917510a8f 100644 (file)
--- a/epoll.c
+++ b/epoll.c
@@ -27,6 +27,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_EPOLL
+
 #include <stdint.h>
 #include <sys/types.h>
 #include <sys/resource.h>
@@ -582,3 +584,5 @@ epoll_dealloc(struct event_base *base)
        memset(epollop, 0, sizeof(struct epollop));
        mm_free(epollop);
 }
+
+#endif /* _EVENT_HAVE_EPOLL */
index 50f065a65c5772f396cc8d95f6124e8fdcf9bd1b..33041f54f9313ad2c0d4c360246f3e48e1dd3434 100644 (file)
--- a/evport.c
+++ b/evport.c
@@ -53,6 +53,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_EVENT_PORTS
+
 #include <sys/time.h>
 #include <sys/queue.h>
 #include <errno.h>
@@ -442,3 +444,5 @@ evport_dealloc(struct event_base *base)
 
        mm_free(evpd);
 }
+
+#endif /* _EVENT_HAVE_EVENT_PORTS */
index 1e42dcf167d4d11ce6011bbb422501f057bd8e98..4ff1135518c2ed4519ff9473f0b1a8f6326c0251 100644 (file)
--- a/kqueue.c
+++ b/kqueue.c
@@ -29,6 +29,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_KQUEUE
+
 #include <sys/types.h>
 #ifdef _EVENT_HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -465,3 +467,5 @@ kq_sig_del(struct event_base *base, int nsignal, short old, short events, void *
 
        return (0);
 }
+
+#endif /* _EVENT_HAVE_KQUEUE */
diff --git a/poll.c b/poll.c
index 0e4401a6d35013bd4ed57ee1fea2682ac9397c93..9eaa77f10af15c641a39bb553eec7eea5e8da28b 100644 (file)
--- a/poll.c
+++ b/poll.c
@@ -29,6 +29,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_POLL
+
 #include <sys/types.h>
 #ifdef _EVENT_HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -332,3 +334,5 @@ poll_dealloc(struct event_base *base)
        memset(pop, 0, sizeof(struct pollop));
        mm_free(pop);
 }
+
+#endif /* _EVENT_HAVE_POLL */
index b482a1c70755bfe40416a63d9ae04296df9c0cbc..e543fb4024976327ad55fd8698c978a9c99ab06a 100644 (file)
--- a/select.c
+++ b/select.c
@@ -29,6 +29,8 @@
 #include "event2/event-config.h"
 #include "evconfig-private.h"
 
+#ifdef _EVENT_HAVE_SELECT
+
 #ifdef __APPLE__
 /* Apple wants us to define this if we might ever pass more than
  * FD_SETSIZE bits to select(). */
@@ -338,3 +340,5 @@ select_dealloc(struct event_base *base)
 
        select_free_selectop(base->evbase);
 }
+
+#endif /* _EVENT_HAVE_SELECT */