aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-11-16 15:35:45 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-11-17 14:08:57 -0800
commitadbfbd5977104987bee9f946f691683b756305e8 (patch)
treee35bcf97ddf6864de5beea7bb903552d4fdd5592 /include
parent90c8cf6acc698ddef1d2da3b205ad8d0014b52fa (diff)
Remove all extern C
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/impl/codegen/core_codegen_interface.h4
-rw-r--r--include/grpc/census.h8
-rw-r--r--include/grpc/compression.h8
-rw-r--r--include/grpc/grpc.h8
-rw-r--r--include/grpc/grpc_cronet.h8
-rw-r--r--include/grpc/grpc_posix.h8
-rw-r--r--include/grpc/grpc_security.h8
-rw-r--r--include/grpc/grpc_security_constants.h8
-rw-r--r--include/grpc/impl/codegen/atm.h8
-rw-r--r--include/grpc/impl/codegen/atm_gcc_atomic.h8
-rw-r--r--include/grpc/impl/codegen/byte_buffer.h8
-rw-r--r--include/grpc/impl/codegen/byte_buffer_reader.h8
-rw-r--r--include/grpc/impl/codegen/compression_types.h8
-rw-r--r--include/grpc/impl/codegen/connectivity_state.h8
-rw-r--r--include/grpc/impl/codegen/gpr_types.h8
-rw-r--r--include/grpc/impl/codegen/grpc_types.h8
-rw-r--r--include/grpc/impl/codegen/propagation_bits.h8
-rw-r--r--include/grpc/impl/codegen/status.h8
-rw-r--r--include/grpc/impl/codegen/sync.h8
-rw-r--r--include/grpc/load_reporting.h8
-rw-r--r--include/grpc/slice.h8
-rw-r--r--include/grpc/slice_buffer.h8
-rw-r--r--include/grpc/support/alloc.h8
-rw-r--r--include/grpc/support/avl.h8
-rw-r--r--include/grpc/support/cmdline.h8
-rw-r--r--include/grpc/support/cpu.h8
-rw-r--r--include/grpc/support/histogram.h8
-rw-r--r--include/grpc/support/host_port.h8
-rw-r--r--include/grpc/support/log.h8
-rw-r--r--include/grpc/support/log_windows.h8
-rw-r--r--include/grpc/support/string_util.h8
-rw-r--r--include/grpc/support/subprocess.h8
-rw-r--r--include/grpc/support/sync.h8
-rw-r--r--include/grpc/support/thd.h8
-rw-r--r--include/grpc/support/time.h8
-rw-r--r--include/grpc/support/tls_pthread.h8
36 files changed, 69 insertions, 215 deletions
diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h
index 1949cdab76..d7ad7a4b57 100644
--- a/include/grpc++/impl/codegen/core_codegen_interface.h
+++ b/include/grpc++/impl/codegen/core_codegen_interface.h
@@ -25,10 +25,6 @@
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/sync.h>
-extern "C" {
-struct grpc_byte_buffer;
-}
-
namespace grpc {
/// Interface between the codegen library and the minimal subset of core
diff --git a/include/grpc/census.h b/include/grpc/census.h
index 2258af8898..d7f2fab50b 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -21,9 +21,7 @@
#include <grpc/grpc.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/**
A Census Context is a handle used by Census to represent the current tracing
@@ -31,8 +29,6 @@ extern "C" {
(this is the responsibility of the local RPC system). */
typedef struct census_context census_context;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CENSUS_H */
diff --git a/include/grpc/compression.h b/include/grpc/compression.h
index b42f428d7d..c0db8c2bfa 100644
--- a/include/grpc/compression.h
+++ b/include/grpc/compression.h
@@ -26,9 +26,7 @@
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/slice.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm. Returns 1 upon success, 0 otherwise. */
@@ -85,8 +83,6 @@ GRPCAPI int grpc_compression_options_is_stream_compression_algorithm_enabled(
const grpc_compression_options* opts,
grpc_stream_compression_algorithm algorithm);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_COMPRESSION_H */
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index f083bc591e..6d6d56a7b3 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -29,9 +29,7 @@
#include <grpc/support/time.h>
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/*! \mainpage GRPC Core
*
@@ -466,8 +464,6 @@ GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
*/
GRPCAPI const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_GRPC_H */
diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h
index 127d5d038d..b3e7ec2705 100644
--- a/include/grpc/grpc_cronet.h
+++ b/include/grpc/grpc_cronet.h
@@ -21,16 +21,12 @@
#include <grpc/grpc.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
GRPCAPI grpc_channel* grpc_cronet_secure_channel_create(
void* engine, const char* target, const grpc_channel_args* args,
void* reserved);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_GRPC_CRONET_H */
diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h
index fa7ebced3f..f14cbaa81b 100644
--- a/include/grpc/grpc_posix.h
+++ b/include/grpc/grpc_posix.h
@@ -24,9 +24,7 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/*! \mainpage GRPC Core POSIX
*
@@ -59,8 +57,6 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server* server,
- This API is optional but if called, it MUST be called before grpc_init() */
GRPCAPI void grpc_use_signal(int signum);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_GRPC_POSIX_H */
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index 7e87217de7..f2a05074c2 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -23,9 +23,7 @@
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** --- Authentication Context. --- */
@@ -461,8 +459,6 @@ typedef struct {
GRPCAPI void grpc_server_credentials_set_auth_metadata_processor(
grpc_server_credentials* creds, grpc_auth_metadata_processor processor);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_GRPC_SECURITY_H */
diff --git a/include/grpc/grpc_security_constants.h b/include/grpc/grpc_security_constants.h
index 60e167eb88..1923525ea0 100644
--- a/include/grpc/grpc_security_constants.h
+++ b/include/grpc/grpc_security_constants.h
@@ -19,9 +19,7 @@
#ifndef GRPC_GRPC_SECURITY_CONSTANTS_H
#define GRPC_GRPC_SECURITY_CONSTANTS_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
#define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME "transport_security_type"
#define GRPC_SSL_TRANSPORT_SECURITY_TYPE "ssl"
@@ -99,8 +97,6 @@ typedef enum {
GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY
} grpc_ssl_client_certificate_request_type;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_GRPC_SECURITY_CONSTANTS_H */
diff --git a/include/grpc/impl/codegen/atm.h b/include/grpc/impl/codegen/atm.h
index 00d83f0604..7bb41c55d2 100644
--- a/include/grpc/impl/codegen/atm.h
+++ b/include/grpc/impl/codegen/atm.h
@@ -79,17 +79,13 @@
#error could not determine platform for atm
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Adds \a delta to \a *value, clamping the result to the range specified
by \a min and \a max. Returns the new value. */
gpr_atm gpr_atm_no_barrier_clamped_add(gpr_atm* value, gpr_atm delta,
gpr_atm min, gpr_atm max);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_ATM_H */
diff --git a/include/grpc/impl/codegen/atm_gcc_atomic.h b/include/grpc/impl/codegen/atm_gcc_atomic.h
index 5879708548..52eebb3c72 100644
--- a/include/grpc/impl/codegen/atm_gcc_atomic.h
+++ b/include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -23,9 +23,7 @@
__atomic_* interface. */
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
@@ -84,8 +82,6 @@ static __inline int gpr_atm_full_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {
#define gpr_atm_full_xchg(p, n) \
GPR_ATM_INC_CAS_THEN(__atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL))
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */
diff --git a/include/grpc/impl/codegen/byte_buffer.h b/include/grpc/impl/codegen/byte_buffer.h
index f8dfbd1d7d..082fb9b36f 100644
--- a/include/grpc/impl/codegen/byte_buffer.h
+++ b/include/grpc/impl/codegen/byte_buffer.h
@@ -21,9 +21,7 @@
#include <grpc/impl/codegen/grpc_types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
*
@@ -79,8 +77,6 @@ grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader* reader);
GRPCAPI grpc_byte_buffer* grpc_raw_byte_buffer_from_reader(
grpc_byte_buffer_reader* reader);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_H */
diff --git a/include/grpc/impl/codegen/byte_buffer_reader.h b/include/grpc/impl/codegen/byte_buffer_reader.h
index e06e19558a..adb64e7831 100644
--- a/include/grpc/impl/codegen/byte_buffer_reader.h
+++ b/include/grpc/impl/codegen/byte_buffer_reader.h
@@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
struct grpc_byte_buffer;
@@ -35,8 +33,6 @@ struct grpc_byte_buffer_reader {
} current;
};
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H */
diff --git a/include/grpc/impl/codegen/compression_types.h b/include/grpc/impl/codegen/compression_types.h
index 4419e2a447..ad19ea6b31 100644
--- a/include/grpc/impl/codegen/compression_types.h
+++ b/include/grpc/impl/codegen/compression_types.h
@@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** To be used as initial metadata key for the request of a concrete compression
* algorithm */
@@ -157,8 +155,6 @@ typedef struct grpc_compression_options {
} grpc_compression_options;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H */
diff --git a/include/grpc/impl/codegen/connectivity_state.h b/include/grpc/impl/codegen/connectivity_state.h
index b70dbef356..713652de24 100644
--- a/include/grpc/impl/codegen/connectivity_state.h
+++ b/include/grpc/impl/codegen/connectivity_state.h
@@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H
#define GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Connectivity state of a channel. */
typedef enum {
@@ -37,8 +35,6 @@ typedef enum {
GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H */
diff --git a/include/grpc/impl/codegen/gpr_types.h b/include/grpc/impl/codegen/gpr_types.h
index d7bb54527e..153d4ec7db 100644
--- a/include/grpc/impl/codegen/gpr_types.h
+++ b/include/grpc/impl/codegen/gpr_types.h
@@ -23,9 +23,7 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** The clocks we support. */
typedef enum {
@@ -52,8 +50,6 @@ typedef struct gpr_timespec {
gpr_clock_type clock_type;
} gpr_timespec;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_GPR_TYPES_H */
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index 03be610d25..faa21a4e40 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -29,9 +29,7 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef enum {
GRPC_BB_RAW
@@ -628,8 +626,6 @@ typedef struct grpc_completion_queue_attributes {
/** The completion queue factory structure is opaque to the callers of grpc */
typedef struct grpc_completion_queue_factory grpc_completion_queue_factory;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_GRPC_TYPES_H */
diff --git a/include/grpc/impl/codegen/propagation_bits.h b/include/grpc/impl/codegen/propagation_bits.h
index 824bdbd8c9..4eac3806fc 100644
--- a/include/grpc/impl/codegen/propagation_bits.h
+++ b/include/grpc/impl/codegen/propagation_bits.h
@@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Propagation bits: this can be bitwise or-ed to form propagation_mask for
* grpc_call */
@@ -45,8 +43,6 @@ extern "C" {
0xffff | GRPC_PROPAGATE_DEADLINE | GRPC_PROPAGATE_CENSUS_STATS_CONTEXT | \
GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT | GRPC_PROPAGATE_CANCELLATION)))
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H */
diff --git a/include/grpc/impl/codegen/status.h b/include/grpc/impl/codegen/status.h
index 9bc3dc9560..4f1bce3a92 100644
--- a/include/grpc/impl/codegen/status.h
+++ b/include/grpc/impl/codegen/status.h
@@ -19,9 +19,7 @@
#ifndef GRPC_IMPL_CODEGEN_STATUS_H
#define GRPC_IMPL_CODEGEN_STATUS_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef enum {
/** Not an error; returned on success */
@@ -146,8 +144,6 @@ typedef enum {
GRPC_STATUS__DO_NOT_USE = -1
} grpc_status_code;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_STATUS_H */
diff --git a/include/grpc/impl/codegen/sync.h b/include/grpc/impl/codegen/sync.h
index 6cdb0c5153..b9cd7204c0 100644
--- a/include/grpc/impl/codegen/sync.h
+++ b/include/grpc/impl/codegen/sync.h
@@ -37,9 +37,7 @@
provides no memory barriers.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* Platform-specific type declarations of gpr_mu and gpr_cv. */
#include <grpc/impl/codegen/port_platform.h>
@@ -55,8 +53,6 @@ extern "C" {
#error Unable to determine platform for sync
#endif
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_IMPL_CODEGEN_SYNC_H */
diff --git a/include/grpc/load_reporting.h b/include/grpc/load_reporting.h
index 55f50ea85e..23ae315a89 100644
--- a/include/grpc/load_reporting.h
+++ b/include/grpc/load_reporting.h
@@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Metadata key for the gRPC LB load balancer token.
*
@@ -41,8 +39,6 @@ extern "C" {
* call. */
#define GRPC_LB_COST_MD_KEY "lb-cost-bin"
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_LOAD_REPORTING_H */
diff --git a/include/grpc/slice.h b/include/grpc/slice.h
index 10b6a624b3..dd188d6849 100644
--- a/include/grpc/slice.h
+++ b/include/grpc/slice.h
@@ -22,9 +22,7 @@
#include <grpc/impl/codegen/slice.h>
#include <grpc/support/sync.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Increment the refcount of s. Requires slice is initialized.
Returns s. */
@@ -163,8 +161,6 @@ GPRAPI grpc_slice grpc_slice_dup(grpc_slice a);
NULL's. Returned string must be freed with gpr_free. */
GPRAPI char* grpc_slice_to_c_string(grpc_slice s);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SLICE_H */
diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h
index 6510c151b3..4ba9f600a5 100644
--- a/include/grpc/slice_buffer.h
+++ b/include/grpc/slice_buffer.h
@@ -21,9 +21,7 @@
#include <grpc/slice.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** initialize a slice buffer */
GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer* sb);
@@ -76,8 +74,6 @@ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* src);
GPRAPI void grpc_slice_buffer_undo_take_first(grpc_slice_buffer* src,
grpc_slice slice);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SLICE_BUFFER_H */
diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h
index 31cb225638..d9398a2902 100644
--- a/include/grpc/support/alloc.h
+++ b/include/grpc/support/alloc.h
@@ -23,9 +23,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct gpr_allocation_functions {
void* (*malloc_fn)(size_t size);
@@ -60,8 +58,6 @@ GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions);
/** Return the family of allocation functions currently in effect. */
GPRAPI gpr_allocation_functions gpr_get_allocation_functions();
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_ALLOC_H */
diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h
index b5a8c0ffa1..d43196f99b 100644
--- a/include/grpc/support/avl.h
+++ b/include/grpc/support/avl.h
@@ -21,9 +21,7 @@
#include <grpc/support/sync.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** internal node of an AVL tree */
typedef struct gpr_avl_node {
@@ -95,8 +93,6 @@ GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void* key, void** value,
/** Return 1 if avl is empty, 0 otherwise */
GPRAPI int gpr_avl_is_empty(gpr_avl avl);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_AVL_H */
diff --git a/include/grpc/support/cmdline.h b/include/grpc/support/cmdline.h
index c34a109fbd..e242eb592b 100644
--- a/include/grpc/support/cmdline.h
+++ b/include/grpc/support/cmdline.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Simple command line parser.
@@ -81,8 +79,6 @@ GPRAPI void gpr_cmdline_destroy(gpr_cmdline* cl);
/** Get a string describing usage */
GPRAPI char* gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_CMDLINE_H */
diff --git a/include/grpc/support/cpu.h b/include/grpc/support/cpu.h
index f0e898e859..dbc7c92993 100644
--- a/include/grpc/support/cpu.h
+++ b/include/grpc/support/cpu.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Interface providing CPU information for currently running system */
@@ -37,8 +35,6 @@ GPRAPI unsigned gpr_cpu_num_cores(void);
[0, gpr_cpu_num_cores() - 1] */
GPRAPI unsigned gpr_cpu_current_cpu(void);
-#ifdef __cplusplus
-} // extern "C"
-#endif
+
#endif /* GRPC_SUPPORT_CPU_H */
diff --git a/include/grpc/support/histogram.h b/include/grpc/support/histogram.h
index d2794d847e..cc08cfa688 100644
--- a/include/grpc/support/histogram.h
+++ b/include/grpc/support/histogram.h
@@ -22,9 +22,7 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct gpr_histogram gpr_histogram;
@@ -57,8 +55,6 @@ GPRAPI void gpr_histogram_merge_contents(gpr_histogram* histogram,
double max_seen, double sum,
double sum_of_squares, double count);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_HISTOGRAM_H */
diff --git a/include/grpc/support/host_port.h b/include/grpc/support/host_port.h
index 9805811bfb..7880b642b5 100644
--- a/include/grpc/support/host_port.h
+++ b/include/grpc/support/host_port.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Given a host and port, creates a newly-allocated string of the form
"host:port" or "[ho:st]:port", depending on whether the host contains colons
@@ -44,8 +42,6 @@ GPRAPI int gpr_join_host_port(char** out, const char* host, int port);
failure. */
GPRAPI int gpr_split_host_port(const char* name, char** host, char** port);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_HOST_PORT_H */
diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h
index 497cca9081..af8e623130 100644
--- a/include/grpc/support/log.h
+++ b/include/grpc/support/log.h
@@ -25,9 +25,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** GPR log API.
@@ -96,8 +94,6 @@ GPRAPI void gpr_set_log_function(gpr_log_func func);
} \
} while (0)
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_LOG_H */
diff --git a/include/grpc/support/log_windows.h b/include/grpc/support/log_windows.h
index e833f9d9df..93d4fc73c4 100644
--- a/include/grpc/support/log_windows.h
+++ b/include/grpc/support/log_windows.h
@@ -21,9 +21,7 @@
#include <grpc/impl/codegen/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Returns a string allocated with gpr_malloc that contains a UTF-8
* formatted error message, corresponding to the error messageid.
@@ -31,8 +29,6 @@ extern "C" {
*/
GPRAPI char* gpr_format_message(int messageid);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_LOG_WINDOWS_H */
diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h
index 2c7460fa15..5c5b60d67e 100644
--- a/include/grpc/support/string_util.h
+++ b/include/grpc/support/string_util.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** String utility functions */
@@ -42,8 +40,6 @@ GPRAPI char* gpr_strdup(const char* src);
GPRAPI int gpr_asprintf(char** strp, const char* format, ...)
GPR_PRINT_FORMAT_CHECK(2, 3);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_STRING_UTIL_H */
diff --git a/include/grpc/support/subprocess.h b/include/grpc/support/subprocess.h
index 175f7b50eb..a050c1ba82 100644
--- a/include/grpc/support/subprocess.h
+++ b/include/grpc/support/subprocess.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct gpr_subprocess gpr_subprocess;
@@ -37,8 +35,6 @@ GPRAPI void gpr_subprocess_destroy(gpr_subprocess* p);
GPRAPI int gpr_subprocess_join(gpr_subprocess* p);
GPRAPI void gpr_subprocess_interrupt(gpr_subprocess* p);
-#ifdef __cplusplus
-} // extern "C"
-#endif
+
#endif /* GRPC_SUPPORT_SUBPROCESS_H */
diff --git a/include/grpc/support/sync.h b/include/grpc/support/sync.h
index 75192673a6..2953e24944 100644
--- a/include/grpc/support/sync.h
+++ b/include/grpc/support/sync.h
@@ -22,9 +22,7 @@
#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** --- Mutex interface ---
@@ -273,9 +271,6 @@ GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter* c);
}
#endif /* 0 */
-#ifdef __cplusplus
-} // extern "C"
-
namespace grpc_core {
class mu_guard {
@@ -291,6 +286,5 @@ class mu_guard {
};
} // namespace grpc_core
-#endif
#endif /* GRPC_SUPPORT_SYNC_H */
diff --git a/include/grpc/support/thd.h b/include/grpc/support/thd.h
index 225d9d6c75..6d398931be 100644
--- a/include/grpc/support/thd.h
+++ b/include/grpc/support/thd.h
@@ -29,9 +29,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef uintptr_t gpr_thd_id;
@@ -69,8 +67,6 @@ GPRAPI gpr_thd_id gpr_thd_currentid(void);
Calling this on a detached thread has unpredictable results. */
GPRAPI void gpr_thd_join(gpr_thd_id t);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_THD_H */
diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h
index 62d354aafe..1ed5ee6ae4 100644
--- a/include/grpc/support/time.h
+++ b/include/grpc/support/time.h
@@ -24,9 +24,7 @@
#include <stddef.h>
#include <time.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Time constants. */
GPRAPI gpr_timespec
@@ -83,8 +81,6 @@ GPRAPI void gpr_sleep_until(gpr_timespec until);
GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_TIME_H */
diff --git a/include/grpc/support/tls_pthread.h b/include/grpc/support/tls_pthread.h
index fb0edd8e74..5a6ff129e8 100644
--- a/include/grpc/support/tls_pthread.h
+++ b/include/grpc/support/tls_pthread.h
@@ -34,12 +34,8 @@ struct gpr_pthread_thread_local {
#define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL))
#define gpr_tls_destroy(tls) pthread_key_delete((tls)->key)
#define gpr_tls_get(tls) ((intptr_t)pthread_getspecific((tls)->key))
-#ifdef __cplusplus
-extern "C" {
-#endif
+
intptr_t gpr_tls_set(struct gpr_pthread_thread_local* tls, intptr_t value);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_SUPPORT_TLS_PTHREAD_H */