Repository: qpid-proton Updated Branches: refs/heads/master c05c398e3 -> c97a13e3f
PROTON-1460: epoll proactor - fix minor compile glitches. - enable -std=c99 for clang compiler - disable -std=c99 for epoll proactor, it uses post c99 pthread APIs - fix minor clang warnings in epoll.c Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/c97a13e3 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/c97a13e3 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/c97a13e3 Branch: refs/heads/master Commit: c97a13e3ff4da8d234c0c0e2f04c126e4c1bea7f Parents: c05c398 Author: Alan Conway <[email protected]> Authored: Fri Apr 21 12:18:30 2017 -0400 Committer: Alan Conway <[email protected]> Committed: Fri Apr 21 12:20:55 2017 -0400 ---------------------------------------------------------------------- proton-c/CMakeLists.txt | 4 +++- proton-c/src/proactor/epoll.c | 6 +----- 2 files changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c97a13e3/proton-c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt index 7894de3..b1de956 100644 --- a/proton-c/CMakeLists.txt +++ b/proton-c/CMakeLists.txt @@ -268,6 +268,7 @@ endif (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_C_COMPILER_ID MATCHES "Clang") set (COMPILE_WARNING_FLAGS "-Wall -pedantic") + set (COMPILE_LANGUAGE_FLAGS "-std=c99") if (ENABLE_WARNING_ERROR) set (COMPILE_WARNING_FLAGS "-Werror ${COMPILE_WARNING_FLAGS}") endif (ENABLE_WARNING_ERROR) @@ -489,8 +490,9 @@ if (PROACTOR STREQUAL "epoll") # OR (NOT PROACTOR AND NOT PROACTOR_OK)) set (PROACTOR_OK epoll) set (qpid-proton-proactor src/proactor/epoll.c) set (PROACTOR_LIBS "") + # Skip COMPILE_LANGUAGE_FLAGS, uses post-c99 pthread APIs. set_source_files_properties (${qpid-proton-proactor} PROPERTIES - COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS} ${LTO}" + COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${LTO}" ) endif() endif() http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c97a13e3/proton-c/src/proactor/epoll.c ---------------------------------------------------------------------- diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c index 85ee99d..9ca4f7c 100644 --- a/proton-c/src/proactor/epoll.c +++ b/proton-c/src/proactor/epoll.c @@ -226,10 +226,6 @@ static void stop_polling(epoll_extended_t *ee, int epollfd) { ee->fd = -1; } -static inline bool polling(epoll_extended_t *ee) { - return ee->fd != -1; -} - /* * The proactor maintains a number of serialization contexts: each * connection, each listener, the proactor itself. The serialization @@ -260,7 +256,7 @@ typedef struct pcontext_t { pcontext_type_t type; bool working; int wake_ops; // unprocessed eventfd wake callback (convert to bool?) - pcontext_t *next; // wake list, guarded by proactor eventfd_mutex + struct pcontext_t *next; // wake list, guarded by proactor eventfd_mutex } pcontext_t; static void pcontext_init(pcontext_t *ctx, pcontext_type_t t, pn_proactor_t *p, void *o) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
