diff --git a/third_party/libevent/epoll.c b/third_party/libevent/epoll.c index 94dcc9bb3f8d..e222e3ec21ed 100644 --- a/third_party/libevent/epoll.c +++ b/third_party/libevent/epoll.c @@ -39,10 +39,6 @@ // Use libevent's local compatibility versions of these. #include "third_party/libevent/compat/sys/queue.h" -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/stdio_poem.h" -#include "starboard/client_porting/poem/string_poem.h" - #include "starboard/system.h" #define LibErr SbSystemGetLastError() #else // STARBOARD @@ -57,17 +53,18 @@ #include #include #include +#endif // STARBOARD #include #include #include #include +#ifndef STARBOARD #include #ifdef HAVE_FCNTL_H #include #endif #define LibErr errno #endif // STARBOARD - #include "event.h" #include "event-internal.h" #ifndef STARBOARD diff --git a/third_party/libevent/event.c b/third_party/libevent/event.c index d411433c217e..b1bd1b282e8b 100644 --- a/third_party/libevent/event.c +++ b/third_party/libevent/event.c @@ -36,10 +36,6 @@ #endif // defined LIBEVENT_PLATFORM_HEADER #include "compat/sys/queue.h" - -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/assert_poem.h" -#include "starboard/client_porting/poem/stdio_poem.h" #else // STARBOARD #ifdef WIN32 #define WIN32_LEAN_AND_MEAN @@ -49,10 +45,11 @@ #include #ifdef HAVE_SYS_TIME_H #include -#else +#else #include #endif #include +#endif // STARBOARD #include #include #ifndef WIN32 @@ -65,8 +62,6 @@ #include #include #include -#endif // STARBOARD - #include "event.h" #include "event-internal.h" #include "evutil.h" diff --git a/third_party/libevent/evutil.c b/third_party/libevent/evutil.c index a5633c8afd21..cfc6a1b3f7a6 100644 --- a/third_party/libevent/evutil.c +++ b/third_party/libevent/evutil.c @@ -36,10 +36,7 @@ #endif // defined LIBEVENT_PLATFORM_HEADER #include "compat/sys/queue.h" - -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/stdio_poem.h" -#else +#else // STARBOARD #ifdef WIN32 #include #define WIN32_LEAN_AND_MEAN @@ -57,19 +54,21 @@ #ifdef HAVE_FCNTL_H #include #endif +#endif // STARBOARD #ifdef HAVE_STDLIB_H #include #endif #include +#ifndef STARBOARD #if defined WIN32 && !defined(HAVE_GETTIMEOFDAY_H) #include #endif +#endif #include +#ifndef STARBOARD #include - #include #endif - #include "event.h" #include "event-internal.h" #include "evutil.h" diff --git a/third_party/libevent/kqueue.c b/third_party/libevent/kqueue.c index e30ba4111733..5e6a23d4472e 100644 --- a/third_party/libevent/kqueue.c +++ b/third_party/libevent/kqueue.c @@ -33,30 +33,27 @@ #ifdef STARBOARD #include "libevent-starboard.h" -#include -#include -#include #include // Use libevent's local compatibility versions of these. #include "third_party/libevent/compat/sys/queue.h" #include "third_party/libevent/compat/sys/_libevent_time.h" - -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/stdio_poem.h" -#include "starboard/client_porting/poem/string_poem.h" #else // STARBOARD #define _GNU_SOURCE 1 - +#endif // STARBOARD #include +#ifndef STARBOARD #ifdef HAVE_SYS_TIME_H #include #else #include #endif #include +#endif // STARBOARD #include +#ifndef STARBOARD #include +#endif // STARBOARD #include #include #include @@ -66,7 +63,6 @@ #ifdef HAVE_INTTYPES_H #include #endif -#endif // STARBOARD /* Some platforms apparently define the udata field of struct kevent as * intptr_t, whereas others define it as void*. There doesn't seem to be an diff --git a/third_party/libevent/log.c b/third_party/libevent/log.c index b4b9d43c6eda..c701549d25aa 100644 --- a/third_party/libevent/log.c +++ b/third_party/libevent/log.c @@ -51,9 +51,6 @@ #include "starboard/common/log.h" #include "starboard/system.h" #include "starboard/types.h" - -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/string_poem.h" #else // STARBOARD #ifdef WIN32 #define WIN32_LEAN_AND_MEAN @@ -61,6 +58,7 @@ #undef WIN32_LEAN_AND_MEAN #endif #include +#endif // STARBOARD #ifdef HAVE_SYS_TIME_H #include #else @@ -71,8 +69,6 @@ #include #include #include -#endif // STARBOARD - #include "event.h" #include "log.h" diff --git a/third_party/libevent/poll.c b/third_party/libevent/poll.c index 52b65336eade..ce419adab760 100644 --- a/third_party/libevent/poll.c +++ b/third_party/libevent/poll.c @@ -37,16 +37,9 @@ #include "libevent-starboard.h" #endif // defined LIBEVENT_PLATFORM_HEADER -#include -#include - // Use libevent's local compatibility versions of these. #include "third_party/libevent/compat/sys/queue.h" #include "third_party/libevent/compat/sys/_libevent_time.h" - -// Include Starboard poems after all system headers. -#include "starboard/client_porting/poem/stdio_poem.h" -#include "starboard/client_porting/poem/string_poem.h" #else // STARBOARD #include #ifdef HAVE_SYS_TIME_H @@ -55,8 +48,11 @@ #include #endif #include +#endif // STARBOARD #include +#ifndef STARBOARD #include +#endif // STARBOARD #include #include #include @@ -65,8 +61,6 @@ #ifdef CHECK_INVARIANTS #include #endif -#endif // STARBOARD - #include "event.h" #include "event-internal.h" #ifndef STARBOARD