Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usages of no-op POEMs (libevent) #2220

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions third_party/libevent/epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -57,17 +53,18 @@
#include <sys/queue.h>
#include <sys/epoll.h>
#include <signal.h>
#endif // STARBOARD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifndef STARBOARD
#include <errno.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#define LibErr errno
#endif // STARBOARD

#include "event.h"
#include "event-internal.h"
#ifndef STARBOARD
Expand Down
6 changes: 1 addition & 5 deletions third_party/libevent/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,6 +49,7 @@
#include <sys/_libevent_time.h>
#endif
#include <sys/queue.h>
#endif // STARBOARD
#include <stdio.h>
#include <stdlib.h>
#ifndef WIN32
Expand All @@ -65,7 +62,6 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#endif // STARBOARD

gbournou marked this conversation as resolved.
Show resolved Hide resolved
#include "event.h"
#include "event-internal.h"
Expand Down
10 changes: 5 additions & 5 deletions third_party/libevent/evutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <winsock2.h>
#define WIN32_LEAN_AND_MEAN
Expand All @@ -57,19 +54,22 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#endif // STARBOARD
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <errno.h>
#ifndef STARBOARD
#if defined WIN32 && !defined(HAVE_GETTIMEOFDAY_H)
#include <sys/timeb.h>
#endif
#endif
#include <stdio.h>
#ifndef STARBOARD
#include <signal.h>

gbournou marked this conversation as resolved.
Show resolved Hide resolved
#include <sys/queue.h>
#endif

#include "event.h"
#include "event-internal.h"
#include "evutil.h"
Expand Down
13 changes: 5 additions & 8 deletions third_party/libevent/kqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,28 @@
#ifdef STARBOARD
#include "libevent-starboard.h"

#include <assert.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/socket.h>

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

gbournou marked this conversation as resolved.
Show resolved Hide resolved
#include <sys/types.h>
#ifndef STARBOARD
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <sys/_libevent_time.h>
#endif
#include <sys/queue.h>
#endif // STARBOARD
#include <sys/event.h>
#ifndef STARBOARD
#include <signal.h>
#endif // STARBOARD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -66,7 +64,6 @@
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#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
Expand Down
6 changes: 1 addition & 5 deletions third_party/libevent/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@
#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
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#endif
#include <sys/types.h>
#endif // STARBOARD
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
Expand All @@ -71,8 +69,6 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#endif // STARBOARD

#include "event.h"

#include "log.h"
Expand Down
11 changes: 3 additions & 8 deletions third_party/libevent/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,9 @@
#include "libevent-starboard.h"
#endif // defined LIBEVENT_PLATFORM_HEADER

#include <poll.h>
#include <stdlib.h>

// 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 <sys/types.h>
#ifdef HAVE_SYS_TIME_H
Expand All @@ -55,8 +48,11 @@
#include <sys/_libevent_time.h>
#endif
#include <sys/queue.h>
#endif // STARBOARD
#include <poll.h>
#ifndef STARBOARD
#include <signal.h>
#endif // STARBOARD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -65,7 +61,6 @@
#ifdef CHECK_INVARIANTS
#include <assert.h>
#endif
#endif // STARBOARD

gbournou marked this conversation as resolved.
Show resolved Hide resolved
#include "event.h"
#include "event-internal.h"
Expand Down
Loading