From 5407089b37581b010504171d939f5a3238411027 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Aug 2016 17:01:18 -0700 Subject: Separate out iomgr-specific constants into a separate header --- src/core/lib/iomgr/pollset_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib/iomgr/pollset_windows.c') diff --git a/src/core/lib/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.c index 626dd784b3..bd650d5609 100644 --- a/src/core/lib/iomgr/pollset_windows.c +++ b/src/core/lib/iomgr/pollset_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET -- cgit v1.2.3 From 623dd4f55624b2fc09848141ab095bf6fe5c6cb2 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Aug 2016 17:31:27 -0700 Subject: Renamed GPR_ constants to GRPC_ in iomgr/port.h --- include/grpc/impl/codegen/port_platform.h | 8 +- src/core/ext/client_config/parse_address.c | 4 +- src/core/ext/client_config/parse_address.h | 2 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 6 +- src/core/lib/iomgr/endpoint_pair_posix.c | 2 +- src/core/lib/iomgr/endpoint_pair_windows.c | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 12 +- src/core/lib/iomgr/ev_epoll_linux.h | 4 +- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 14 +-- src/core/lib/iomgr/ev_poll_posix.c | 2 +- src/core/lib/iomgr/ev_posix.c | 4 +- src/core/lib/iomgr/iocp_windows.c | 4 +- src/core/lib/iomgr/iomgr_posix.c | 2 +- src/core/lib/iomgr/iomgr_windows.c | 2 +- src/core/lib/iomgr/pollset_set_windows.c | 4 +- src/core/lib/iomgr/pollset_windows.c | 4 +- src/core/lib/iomgr/port.h | 124 ++++++++++----------- src/core/lib/iomgr/resolve_address_posix.c | 2 +- src/core/lib/iomgr/resolve_address_windows.c | 2 +- src/core/lib/iomgr/sockaddr.h | 2 +- src/core/lib/iomgr/socket_utils.h | 2 +- src/core/lib/iomgr/socket_utils_common_posix.c | 8 +- src/core/lib/iomgr/socket_utils_linux.c | 2 +- src/core/lib/iomgr/socket_utils_posix.c | 4 +- src/core/lib/iomgr/socket_utils_windows.c | 4 +- src/core/lib/iomgr/socket_windows.c | 4 +- src/core/lib/iomgr/tcp_client_posix.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 4 +- src/core/lib/iomgr/tcp_posix.c | 8 +- src/core/lib/iomgr/tcp_server_posix.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 4 +- src/core/lib/iomgr/tcp_windows.c | 4 +- src/core/lib/iomgr/udp_server.c | 2 +- src/core/lib/iomgr/unix_sockets_posix.c | 2 +- src/core/lib/iomgr/unix_sockets_posix_noop.c | 2 +- src/core/lib/iomgr/wakeup_fd_eventfd.c | 4 +- src/core/lib/iomgr/wakeup_fd_nospecial.c | 4 +- src/core/lib/iomgr/wakeup_fd_pipe.c | 2 +- src/core/lib/iomgr/wakeup_fd_posix.c | 4 +- src/core/lib/iomgr/workqueue.h | 2 +- src/core/lib/iomgr/workqueue_posix.c | 4 +- test/core/end2end/fixtures/h2_full+trace.c | 2 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 2 +- test/core/iomgr/ev_epoll_linux_test.c | 6 +- test/core/util/port_posix.c | 4 +- test/core/util/port_windows.c | 4 +- test/cpp/end2end/async_end2end_test.cc | 4 +- 47 files changed, 148 insertions(+), 154 deletions(-) (limited to 'src/core/lib/iomgr/pollset_windows.c') diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 1aeda9b658..f65f56db87 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -178,8 +178,8 @@ #define GPR_LINUX_LOG #define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_LINUX_ENV 1 -#ifndef GPR_LINUX_EVENTFD -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#ifndef GRPC_LINUX_EVENTFD +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -348,10 +348,6 @@ typedef unsigned __int64 uint64_t; #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM #endif -#if defined(GPR_POSIX_MULTIPOLL_WITH_POLL) && !defined(GPR_POSIX_SOCKET) -#error Must define GPR_POSIX_SOCKET to use GPR_POSIX_MULTIPOLL_WITH_POLL -#endif - #if defined(GPR_MSVC_TLS) + defined(GPR_GCC_TLS) + defined(GPR_PTHREAD_TLS) + \ defined(GPR_CUSTOM_TLS) != \ 1 diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c index 8b4abe24a6..7c548b15ad 100644 --- a/src/core/ext/client_config/parse_address.c +++ b/src/core/ext/client_config/parse_address.c @@ -35,7 +35,7 @@ #include #include -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET #include #endif @@ -44,7 +44,7 @@ #include #include -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { struct sockaddr_un *un = (struct sockaddr_un *)addr; diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h index 74c86f4d93..16300de208 100644 --- a/src/core/ext/client_config/parse_address.h +++ b/src/core/ext/client_config/parse_address.h @@ -39,7 +39,7 @@ #include "src/core/ext/client_config/uri_parser.h" #include "src/core/lib/iomgr/sockaddr.h" -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET /** Populate \a addr and \a len from \a uri, whose path is expected to contain a * unix socket path. Returns true upon success. */ int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 1f7cce2f43..d613c5393e 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -163,7 +163,7 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory, return ip_get_default_authority(uri); } -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET char *unix_get_default_authority(grpc_resolver_factory *factory, grpc_uri *uri) { return gpr_strdup("localhost"); @@ -271,7 +271,7 @@ static void sockaddr_factory_unref(grpc_resolver_factory *factory) {} static grpc_resolver_factory name##_resolver_factory = { \ &name##_factory_vtable} -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET DECL_FACTORY(unix); #endif DECL_FACTORY(ipv4); @@ -280,7 +280,7 @@ DECL_FACTORY(ipv6); void grpc_resolver_sockaddr_init(void) { grpc_register_resolver_type(&ipv4_resolver_factory); grpc_register_resolver_type(&ipv6_resolver_factory); -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET grpc_register_resolver_type(&unix_resolver_factory); #endif } diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index 7437dbf6ab..ec2cd782b1 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index 0933ba0d57..5c78c95492 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/sockaddr_utils.h" diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 2d9c0e49b2..9837a98692 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -35,7 +35,7 @@ #include "src/core/lib/iomgr/port.h" /* This polling engine is only relevant on linux kernels supporting epoll() */ -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" @@ -1905,13 +1905,13 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return &vtable; } -#else /* defined(GPR_LINUX_EPOLL) */ -#if defined(GPR_POSIX_SOCKET) +#else /* defined(GRPC_LINUX_EPOLL) */ +#if defined(GRPC_POSIX_SOCKET) #include "src/core/lib/iomgr/ev_posix.h" -/* If GPR_LINUX_EPOLL is not defined, it means epoll is not available. Return +/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } -#endif /* defined(GPR_POSIX_SOCKET) */ +#endif /* defined(GRPC_POSIX_SOCKET) */ void grpc_use_signal(int signum) {} -#endif /* !defined(GPR_LINUX_EPOLL) */ +#endif /* !defined(GRPC_LINUX_EPOLL) */ diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index e2a66555bc..e6d5441236 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -39,10 +39,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void); -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL void *grpc_fd_get_polling_island(grpc_fd *fd); void *grpc_pollset_get_polling_island(grpc_pollset *ps); bool grpc_are_polling_islands_equal(void *p, void *q); -#endif /* defined(GPR_LINUX_EPOLL) */ +#endif /* defined(GRPC_LINUX_EPOLL) */ #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 57ae8325e8..fb35311d2b 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -44,7 +44,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" @@ -1338,7 +1338,7 @@ static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) { * pollset_multipoller_with_poll_posix.c */ -#ifndef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifndef GRPC_LINUX_MULTIPOLL_WITH_EPOLL typedef struct { /* all polled fds */ @@ -1520,13 +1520,13 @@ static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, } } -#endif /* !GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#endif /* !GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ /******************************************************************************* * pollset_multipoller_with_epoll_posix.c */ -#ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL #include #include @@ -1839,11 +1839,11 @@ static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, } } -#else /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#else /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ static void remove_fd_from_all_epoll_sets(int fd) {} -#endif /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#endif /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ /******************************************************************************* * pollset_set_posix.c @@ -2033,7 +2033,7 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void) { -#ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL platform_become_multipoller = epoll_become_multipoller; #else platform_become_multipoller = poll_become_multipoller; diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 7df1b2e3de..52c137b8a3 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_poll_posix.h" diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index b510c6fc26..6079a60b22 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_posix.h" @@ -258,4 +258,4 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_error *grpc_kick_poller(void) { return g_event_engine->kick_poller(); } -#endif // GPR_POSIX_SOCKET +#endif // GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.c index e6915502a4..60ebe43676 100644 --- a/src/core/lib/iomgr/iocp_windows.c +++ b/src/core/lib/iomgr/iocp_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -166,4 +166,4 @@ void grpc_iocp_add_socket(grpc_winsocket *socket) { GPR_ASSERT(ret == g_iocp); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/iomgr_posix.c b/src/core/lib/iomgr/iomgr_posix.c index 963684ad7a..f5ee0c9ee4 100644 --- a/src/core/lib/iomgr/iomgr_posix.c +++ b/src/core/lib/iomgr/iomgr_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/lib/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.c index e0e307bf81..b659264ede 100644 --- a/src/core/lib/iomgr/iomgr_windows.c +++ b/src/core/lib/iomgr/iomgr_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/sockaddr_windows.h" diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 4a2563d32e..293893f18e 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -34,7 +34,7 @@ #include "src/core/lib/iomgr/port.h" #include -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/pollset_set_windows.h" @@ -60,4 +60,4 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx* exec_ctx, grpc_pollset_set* bag, grpc_pollset_set* item) {} -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.c index bd650d5609..5540303e49 100644 --- a/src/core/lib/iomgr/pollset_windows.c +++ b/src/core/lib/iomgr/pollset_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include #include @@ -241,4 +241,4 @@ grpc_error *grpc_pollset_kick(grpc_pollset *p, void grpc_kick_poller(void) { grpc_iocp_kick(); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index acd68dce79..021bbfff5a 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -37,88 +37,86 @@ #define GRPC_CORE_LIB_IOMGR_PORT_H #if defined(GPR_WINDOWS) -#define GPR_WINSOCK_SOCKET 1 -#define GPR_WINDOWS_SOCKETUTILS 1 -/* #undef GPR_POSIX_SOCKET */ -/* #undef GPR_POSIX_WAKEUP_FD */ +#define GRPC_WINSOCK_SOCKET 1 +#define GRPC_WINDOWS_SOCKETUTILS 1 #elif defined(GPR_MANYLINUX1) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_ANDROID) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_LINUX_EVENTFD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_LINUX_EVENTFD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_LINUX) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_LINUX_MULTIPOLL_WITH_EPOLL 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_WAKEUP_FD 1 #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 9) -#define GPR_LINUX_EPOLL 1 -#define GPR_LINUX_EVENTFD 1 +#define GRPC_LINUX_EPOLL 1 +#define GRPC_LINUX_EVENTFD 1 #endif #if __GLIBC_PREREQ(2, 10) -#define GPR_LINUX_SOCKETUTILS 1 +#define GRPC_LINUX_SOCKETUTILS 1 #endif #endif -#ifndef GPR_LINUX_EVENTFD -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#ifndef GRPC_LINUX_EVENTFD +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif -#ifndef GPR_LINUX_SOCKETUTILS -#define GPR_POSIX_SOCKETUTILS +#ifndef GRPC_LINUX_SOCKETUTILS +#define GRPC_POSIX_SOCKETUTILS #endif #elif defined(GPR_APPLE) -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_MSG_IOVLEN_TYPE int -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_SO_NOSIGPIPE 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_MSG_IOVLEN_TYPE int +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_FREEBSD) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_SO_NOSIGPIPE 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_NACL) -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif !defined(GPR_NO_AUTODETECT_PLATFORM) #error "Platform not recognized" #endif -#if defined(GPR_POSIX_SOCKET) + defined(GPR_WINSOCK_SOCKET) + \ - defined(GPR_CUSTOM_SOCKET) != \ +#if defined(GRPC_POSIX_SOCKET) + defined(GRPC_WINSOCK_SOCKET) + \ + defined(GRPC_CUSTOM_SOCKET) != \ 1 -#error Must define exactly one of GPR_POSIX_SOCKET, GPR_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET +#error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET #endif #endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 164fe10855..9bc46901b1 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 334473c6bf..460bd1f2ee 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index fd85f176da..58cae6cc01 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -40,7 +40,7 @@ #include "src/core/lib/iomgr/sockaddr_windows.h" #endif -#ifdef GPR_POSIX_SOCKETADDR +#ifdef GRPC_POSIX_SOCKETADDR #include "src/core/lib/iomgr/sockaddr_posix.h" #endif diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 1d871a34e6..f0b5a33b63 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -36,7 +36,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "sockaddr_windows.h" #else #include "sockaddr_posix.h" diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index afd9a7652e..2143256846 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" @@ -79,7 +79,7 @@ grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking) { } grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { -#ifdef GPR_HAVE_SO_NOSIGPIPE +#ifdef GRPC_HAVE_SO_NOSIGPIPE int val = 1; int newval; socklen_t intlen = sizeof(newval); @@ -97,7 +97,7 @@ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { } grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { -#ifdef GPR_HAVE_IP_PKTINFO +#ifdef GRPC_HAVE_IP_PKTINFO int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, sizeof(get_local_ip))) { @@ -108,7 +108,7 @@ grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { } grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { -#ifdef GPR_HAVE_IPV6_RECVPKTINFO +#ifdef GRPC_HAVE_IPV6_RECVPKTINFO int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, sizeof(get_local_ip))) { diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c index defdaf388e..3ebc3f1ac1 100644 --- a/src/core/lib/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_LINUX_SOCKETUTILS +#ifdef GRPC_LINUX_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index a923ff870f..4f26773342 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKETUTILS +#ifdef GRPC_POSIX_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils_posix.h" @@ -67,4 +67,4 @@ close_and_error: return -1; } -#endif /* GPR_POSIX_SOCKETUTILS */ +#endif /* GRPC_POSIX_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index c9ddce156b..74dbd57c7d 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINDOWS_SOCKETUTILS +#ifdef GRPC_WINDOWS_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils.h" @@ -45,4 +45,4 @@ const char *grpc_inet_ntop(int af, const void *src, return InetNtop(af, src, dst, (size_t)size); } -#endif /* GPR_WINDOWS_SOCKETUTILS */ +#endif /* GRPC_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c index e9d0cedce5..14bd603d02 100644 --- a/src/core/lib/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -156,4 +156,4 @@ void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, if (should_destroy) destroy(socket); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 84b22d0c33..4c1dcd671f 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/tcp_client.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 2ae4834f99..29775cce21 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/sockaddr_windows.h" @@ -228,4 +228,4 @@ failure: grpc_exec_ctx_sched(exec_ctx, on_done, final_error, NULL); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index ba4dc75575..b3ed0484fd 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/tcp_posix.h" @@ -58,14 +58,14 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" -#ifdef GPR_HAVE_MSG_NOSIGNAL +#ifdef GRPC_HAVE_MSG_NOSIGNAL #define SENDMSG_FLAGS MSG_NOSIGNAL #else #define SENDMSG_FLAGS 0 #endif -#ifdef GPR_MSG_IOVLEN_TYPE -typedef GPR_MSG_IOVLEN_TYPE msg_iovlen_type; +#ifdef GRPC_MSG_IOVLEN_TYPE +typedef GRPC_MSG_IOVLEN_TYPE msg_iovlen_type; #else typedef size_t msg_iovlen_type; #endif diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 75241bd65d..0a2c80a6f6 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/tcp_server.h" diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index fd193c3fa2..b84a109537 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -543,4 +543,4 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {} -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 0eecccb000..533f07abc0 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -416,4 +416,4 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { return &tcp->base; } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 07eee75e5a..b8076c965c 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -39,7 +39,7 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_NEED_UDP -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/udp_server.h" diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index c59d38848b..33082a2e99 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET #include #include diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.c index 56b47c3daf..82f008d599 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.c +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/unix_sockets_posix.h" -#ifndef GPR_HAVE_UNIX_SOCKET +#ifndef GRPC_HAVE_UNIX_SOCKET #include diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c index 3d21d9d1d5..373e21d3e1 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_LINUX_EVENTFD +#ifdef GRPC_LINUX_EVENTFD #include #include @@ -94,4 +94,4 @@ const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { eventfd_create, eventfd_consume, eventfd_wakeup, eventfd_destroy, eventfd_check_availability}; -#endif /* GPR_LINUX_EVENTFD */ +#endif /* GRPC_LINUX_EVENTFD */ diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.c b/src/core/lib/iomgr/wakeup_fd_nospecial.c index c2b273d3a6..611bced029 100644 --- a/src/core/lib/iomgr/wakeup_fd_nospecial.c +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.c @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_NO_SPECIAL_WAKEUP_FD +#ifdef GRPC_POSIX_NO_SPECIAL_WAKEUP_FD #include #include "src/core/lib/iomgr/wakeup_fd_posix.h" @@ -48,4 +48,4 @@ static int check_availability_invalid(void) { return 0; } const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { NULL, NULL, NULL, NULL, check_availability_invalid}; -#endif /* GPR_POSIX_NO_SPECIAL_WAKEUP_FD */ +#endif /* GRPC_POSIX_NO_SPECIAL_WAKEUP_FD */ diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 8991d17741..b9754228b1 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_WAKEUP_FD +#ifdef GRPC_POSIX_WAKEUP_FD #include "src/core/lib/iomgr/wakeup_fd_posix.h" diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index c5c4eeb62e..dc51a08ca2 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_WAKEUP_FD +#ifdef GRPC_POSIX_WAKEUP_FD #include #include "src/core/lib/iomgr/wakeup_fd_pipe.h" @@ -69,4 +69,4 @@ void grpc_wakeup_fd_destroy(grpc_wakeup_fd *fd_info) { wakeup_fd_vtable->destroy(fd_info); } -#endif /* GPR_POSIX_WAKEUP_FD */ +#endif /* GRPC_POSIX_WAKEUP_FD */ diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 86c7114c31..3edba4b305 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -41,7 +41,7 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/workqueue_posix.h" #endif diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 2665b9580f..f28a442718 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/workqueue.h" @@ -148,4 +148,4 @@ void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, gpr_mu_unlock(&workqueue->mu); } -#endif /* GPR_POSIX_SOCKET */ +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index ad31d21fef..e25b5e3347 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) { code paths in trace.c to be taken */ gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; #else g_fixture_slowdown_factor = 10.0; diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 429c2013d3..90f815077c 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -147,7 +147,7 @@ int main(int argc, char **argv) { /* force tracing on, with a value to force many code paths in trace.c to be taken */ gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; #else g_fixture_slowdown_factor = 10.0; diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index d7ee6da7c6..564b05d7f4 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" /* This test only relevant on linux systems where epoll() is available */ -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_posix.h" @@ -239,6 +239,6 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } -#else /* defined(GPR_LINUX_EPOLL) */ +#else /* defined(GRPC_LINUX_EPOLL) */ int main(int argc, char **argv) { return 0; } -#endif /* !defined(GPR_LINUX_EPOLL) */ +#endif /* !defined(GRPC_LINUX_EPOLL) */ diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 6e3ab64edd..60537b4946 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" -#if defined(GPR_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT) +#if defined(GRPC_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT) #include "test/core/util/port.h" @@ -237,4 +237,4 @@ int grpc_pick_unused_port_or_die(void) { void grpc_recycle_unused_port(int port) { GPR_ASSERT(free_chosen_port(port)); } -#endif /* GPR_POSIX_SOCKET && GRPC_TEST_PICK_PORT */ +#endif /* GRPC_POSIX_SOCKET && GRPC_TEST_PICK_PORT */ diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 4cc0cea0cb..db9787dec6 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" -#if defined(GPR_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) +#if defined(GRPC_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) #include "test/core/util/port.h" @@ -242,4 +242,4 @@ int grpc_pick_unused_port_or_die(void) { void grpc_recycle_unused_port(int port) { GPR_ASSERT(free_chosen_port(port)); } -#endif /* GPR_WINSOCK_SOCKET && GRPC_TEST_PICK_PORT */ +#endif /* GRPC_WINSOCK_SOCKET && GRPC_TEST_PICK_PORT */ diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 662ccbd1c2..b5c95bca86 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -55,7 +55,7 @@ #include "test/cpp/util/string_ref_helper.h" #include "test/cpp/util/test_credentials_provider.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_posix.h" #endif @@ -74,7 +74,7 @@ namespace { void* tag(int i) { return (void*)(intptr_t)i; } int detag(void* p) { return static_cast(reinterpret_cast(p)); } -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET static int maybe_assert_non_blocking_poll(struct pollfd* pfds, nfds_t nfds, int timeout) { if (gpr_tls_get(&g_is_async_end2end_test)) { -- cgit v1.2.3