Skip to content

Commit

Permalink
Put #ifdef around some files to support alternate build systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosslagerwall committed Feb 8, 2012
1 parent c00416f commit 76d4c92
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -305,3 +307,5 @@ devpoll_dealloc(struct event_base *base)
memset(devpollop, 0, sizeof(struct devpollop));
mm_free(devpollop);
}

#endif /* _EVENT_HAVE_DEVPOLL */
4 changes: 4 additions & 0 deletions epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -582,3 +584,5 @@ epoll_dealloc(struct event_base *base)
memset(epollop, 0, sizeof(struct epollop));
mm_free(epollop);
}

#endif /* _EVENT_HAVE_EPOLL */
4 changes: 4 additions & 0 deletions evport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -442,3 +444,5 @@ evport_dealloc(struct event_base *base)

mm_free(evpd);
}

#endif /* _EVENT_HAVE_EVENT_PORTS */
4 changes: 4 additions & 0 deletions kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 changes: 4 additions & 0 deletions poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -332,3 +334,5 @@ poll_dealloc(struct event_base *base)
memset(pop, 0, sizeof(struct pollop));
mm_free(pop);
}

#endif /* _EVENT_HAVE_POLL */
4 changes: 4 additions & 0 deletions select.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(). */
Expand Down Expand Up @@ -338,3 +340,5 @@ select_dealloc(struct event_base *base)

select_free_selectop(base->evbase);
}

#endif /* _EVENT_HAVE_SELECT */

0 comments on commit 76d4c92

Please sign in to comment.