Put #ifdef around some files to support alternate build systems.

This commit is contained in:
Ross Lagerwall 2012-02-08 18:46:00 +02:00
parent c00416f745
commit 76d4c929d7
6 changed files with 24 additions and 0 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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
View File

@ -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 */

View File

@ -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 */