mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-21 18:31:23 -04:00
Put #ifdef around some files to support alternate build systems.
This commit is contained in:
parent
c00416f745
commit
76d4c929d7
@ -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 */
|
||||
|
4
epoll.c
4
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 */
|
||||
|
4
evport.c
4
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 */
|
||||
|
4
kqueue.c
4
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 */
|
||||
|
4
poll.c
4
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 */
|
||||
|
4
select.c
4
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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user