diff options
author | 2017-10-02 17:42:41 -0700 | |
---|---|---|
committer | 2017-10-02 19:01:25 -0700 | |
commit | bc460fa3c41ead4323c6fcb42f1a76c9cbef9b14 (patch) | |
tree | ba76aaf9bfb3023ba8178fe833090843a8dad535 /src/core/lib | |
parent | c7eaff15c0004d1dbd3c635cae222dd3d609c165 (diff) |
Rebasing on master for easier merging and testing
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/compression/stream_compression.h | 4 | ||||
-rw-r--r-- | src/core/lib/compression/stream_compression_gzip.cc (renamed from src/core/lib/compression/stream_compression_gzip.c) | 0 | ||||
-rw-r--r-- | src/core/lib/compression/stream_compression_gzip.h | 8 | ||||
-rw-r--r-- | src/core/lib/compression/stream_compression_identity.cc (renamed from src/core/lib/compression/stream_compression_identity.c) | 0 | ||||
-rw-r--r-- | src/core/lib/compression/stream_compression_identity.h | 8 | ||||
-rw-r--r-- | src/core/lib/debug/stats_data.h | 8 | ||||
-rw-r--r-- | src/core/lib/iomgr/gethostname.h | 1 | ||||
-rw-r--r-- | src/core/lib/iomgr/gethostname_fallback.cc | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/gethostname_host_name_max.cc | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/gethostname_sysconf.cc | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/socket_utils_windows.cc | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/tcp_client_uv.cc | 8 |
12 files changed, 33 insertions, 14 deletions
diff --git a/src/core/lib/compression/stream_compression.h b/src/core/lib/compression/stream_compression.h index 901f9357ee..6ee3ac1966 100644 --- a/src/core/lib/compression/stream_compression.h +++ b/src/core/lib/compression/stream_compression.h @@ -24,12 +24,12 @@ #include <grpc/slice_buffer.h> #include <zlib.h> +#include "src/core/lib/transport/static_metadata.h" + #ifdef __cplusplus extern "C" { #endif -#include "src/core/lib/transport/static_metadata.h" - typedef struct grpc_stream_compression_vtable grpc_stream_compression_vtable; /* Stream compression/decompression context */ diff --git a/src/core/lib/compression/stream_compression_gzip.c b/src/core/lib/compression/stream_compression_gzip.cc index 087b018be5..087b018be5 100644 --- a/src/core/lib/compression/stream_compression_gzip.c +++ b/src/core/lib/compression/stream_compression_gzip.cc diff --git a/src/core/lib/compression/stream_compression_gzip.h b/src/core/lib/compression/stream_compression_gzip.h index 7cf49a0de9..a3f1b0406f 100644 --- a/src/core/lib/compression/stream_compression_gzip.h +++ b/src/core/lib/compression/stream_compression_gzip.h @@ -21,6 +21,14 @@ #include "src/core/lib/compression/stream_compression.h" +#ifdef __cplusplus +extern "C" { +#endif + extern const grpc_stream_compression_vtable grpc_stream_compression_gzip_vtable; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/core/lib/compression/stream_compression_identity.c b/src/core/lib/compression/stream_compression_identity.cc index 9b2e6062e1..9b2e6062e1 100644 --- a/src/core/lib/compression/stream_compression_identity.c +++ b/src/core/lib/compression/stream_compression_identity.cc diff --git a/src/core/lib/compression/stream_compression_identity.h b/src/core/lib/compression/stream_compression_identity.h index 41926e949e..3a729fafad 100644 --- a/src/core/lib/compression/stream_compression_identity.h +++ b/src/core/lib/compression/stream_compression_identity.h @@ -21,7 +21,15 @@ #include "src/core/lib/compression/stream_compression.h" +#ifdef __cplusplus +extern "C" { +#endif + extern const grpc_stream_compression_vtable grpc_stream_compression_identity_vtable; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h index 28dab00117..cf5bafbd04 100644 --- a/src/core/lib/debug/stats_data.h +++ b/src/core/lib/debug/stats_data.h @@ -24,6 +24,10 @@ #include <inttypes.h> #include "src/core/lib/iomgr/exec_ctx.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED, GRPC_STATS_COUNTER_SERVER_CALLS_CREATED, @@ -467,4 +471,8 @@ extern const int *const grpc_stats_histo_bucket_boundaries[13]; extern void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx, int x); +#ifdef __cplusplus +} +#endif + #endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */ diff --git a/src/core/lib/iomgr/gethostname.h b/src/core/lib/iomgr/gethostname.h index c0a4c7e6df..f335fea586 100644 --- a/src/core/lib/iomgr/gethostname.h +++ b/src/core/lib/iomgr/gethostname.h @@ -31,5 +31,4 @@ char *grpc_gethostname(); } #endif - #endif /* GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H */ diff --git a/src/core/lib/iomgr/gethostname_fallback.cc b/src/core/lib/iomgr/gethostname_fallback.cc index 31dff5812c..e6f4c2f760 100644 --- a/src/core/lib/iomgr/gethostname_fallback.cc +++ b/src/core/lib/iomgr/gethostname_fallback.cc @@ -16,8 +16,8 @@ * */ -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/gethostname.h" +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_GETHOSTNAME_FALLBACK diff --git a/src/core/lib/iomgr/gethostname_host_name_max.cc b/src/core/lib/iomgr/gethostname_host_name_max.cc index 9be319dab8..cdaf097c3e 100644 --- a/src/core/lib/iomgr/gethostname_host_name_max.cc +++ b/src/core/lib/iomgr/gethostname_host_name_max.cc @@ -16,8 +16,8 @@ * */ -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/gethostname.h" +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_HOST_NAME_MAX diff --git a/src/core/lib/iomgr/gethostname_sysconf.cc b/src/core/lib/iomgr/gethostname_sysconf.cc index 4cc7ebf4c0..8441e0615e 100644 --- a/src/core/lib/iomgr/gethostname_sysconf.cc +++ b/src/core/lib/iomgr/gethostname_sysconf.cc @@ -16,8 +16,8 @@ * */ -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/gethostname.h" +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SYSCONF diff --git a/src/core/lib/iomgr/socket_utils_windows.cc b/src/core/lib/iomgr/socket_utils_windows.cc index 2732c159aa..6e85e4b61f 100644 --- a/src/core/lib/iomgr/socket_utils_windows.cc +++ b/src/core/lib/iomgr/socket_utils_windows.cc @@ -26,12 +26,8 @@ #include <grpc/support/log.h> const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) { -#ifdef GPR_WIN_INET_NTOP - return inet_ntop(af, src, dst, size); -#else /* Windows InetNtopA wants a mutable ip pointer */ return InetNtopA(af, (void *)src, dst, size); -#endif /* GPR_WIN_INET_NTOP */ } #endif /* GRPC_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/tcp_client_uv.cc b/src/core/lib/iomgr/tcp_client_uv.cc index 274366b356..b2c80d52c6 100644 --- a/src/core/lib/iomgr/tcp_client_uv.cc +++ b/src/core/lib/iomgr/tcp_client_uv.cc @@ -131,16 +131,16 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, for (size_t i = 0; i < channel_args->num_args; i++) { if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { grpc_resource_quota_unref_internal(exec_ctx, resource_quota); - resource_quota = grpc_resource_quota_ref_internal((grpc_resource_quota *) - channel_args->args[i].value.pointer.p); + resource_quota = grpc_resource_quota_ref_internal( + (grpc_resource_quota *)channel_args->args[i].value.pointer.p); } } } - connect = (grpc_uv_tcp_connect*)gpr_zalloc(sizeof(grpc_uv_tcp_connect)); + connect = (grpc_uv_tcp_connect *)gpr_zalloc(sizeof(grpc_uv_tcp_connect)); connect->closure = closure; connect->endpoint = ep; - connect->tcp_handle = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t)); + connect->tcp_handle = (uv_tcp_t *)gpr_malloc(sizeof(uv_tcp_t)); connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); connect->resource_quota = resource_quota; uv_tcp_init(uv_default_loop(), connect->tcp_handle); |