Remove all extern C
diff --git a/src/core/lib/support/arena.h b/src/core/lib/support/arena.h
index 4d43c56..9984c53 100644
--- a/src/core/lib/support/arena.h
+++ b/src/core/lib/support/arena.h
@@ -27,9 +27,7 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct gpr_arena gpr_arena;
@@ -40,8 +38,6 @@
// Destroy an arena, returning the total number of bytes allocated
size_t gpr_arena_destroy(gpr_arena* arena);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_ARENA_H */
diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h
index f50d7bc..fe51b70 100644
--- a/src/core/lib/support/env.h
+++ b/src/core/lib/support/env.h
@@ -21,9 +21,7 @@
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* Env utility functions */
@@ -42,8 +40,6 @@
level of logging. So DO NOT USE THIS. */
const char* gpr_getenv_silent(const char* name, char** dst);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_ENV_H */
diff --git a/src/core/lib/support/log.cc b/src/core/lib/support/log.cc
index e9adc6c..2a40745 100644
--- a/src/core/lib/support/log.cc
+++ b/src/core/lib/support/log.cc
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <string.h>
-extern "C" void gpr_default_log(gpr_log_func_args* args);
+void gpr_default_log(gpr_log_func_args* args);
static gpr_atm g_log_func = (gpr_atm)gpr_default_log;
static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET;
diff --git a/src/core/lib/support/log_android.cc b/src/core/lib/support/log_android.cc
index 73d24cd..648a016 100644
--- a/src/core/lib/support/log_android.cc
+++ b/src/core/lib/support/log_android.cc
@@ -39,7 +39,7 @@
return ANDROID_LOG_DEFAULT;
}
-extern "C" void gpr_log(const char* file, int line, gpr_log_severity severity,
+void gpr_log(const char* file, int line, gpr_log_severity severity,
const char* format, ...) {
char* message = NULL;
va_list args;
@@ -50,7 +50,7 @@
free(message);
}
-extern "C" void gpr_default_log(gpr_log_func_args* args) {
+void gpr_default_log(gpr_log_func_args* args) {
const char* final_slash;
const char* display_file;
char* output = NULL;
diff --git a/src/core/lib/support/log_linux.cc b/src/core/lib/support/log_linux.cc
index e0e277f..6b1f1c7 100644
--- a/src/core/lib/support/log_linux.cc
+++ b/src/core/lib/support/log_linux.cc
@@ -56,7 +56,7 @@
free(message);
}
-extern "C" void gpr_default_log(gpr_log_func_args* args) {
+void gpr_default_log(gpr_log_func_args* args) {
const char* final_slash;
char* prefix;
const char* display_file;
diff --git a/src/core/lib/support/log_posix.cc b/src/core/lib/support/log_posix.cc
index e765f91..9fab480 100644
--- a/src/core/lib/support/log_posix.cc
+++ b/src/core/lib/support/log_posix.cc
@@ -56,7 +56,7 @@
gpr_free(allocated);
}
-extern "C" void gpr_default_log(gpr_log_func_args* args) {
+void gpr_default_log(gpr_log_func_args* args) {
const char* final_slash;
const char* display_file;
char time_buffer[64];
diff --git a/src/core/lib/support/log_windows.cc b/src/core/lib/support/log_windows.cc
index d448179..0013bf4 100644
--- a/src/core/lib/support/log_windows.cc
+++ b/src/core/lib/support/log_windows.cc
@@ -65,7 +65,7 @@
}
/* Simple starter implementation */
-extern "C" void gpr_default_log(gpr_log_func_args* args) {
+void gpr_default_log(gpr_log_func_args* args) {
const char* final_slash;
const char* display_file;
char time_buffer[64];
diff --git a/src/core/lib/support/mpscq.h b/src/core/lib/support/mpscq.h
index fb22742..743a62b 100644
--- a/src/core/lib/support/mpscq.h
+++ b/src/core/lib/support/mpscq.h
@@ -24,9 +24,7 @@
#include <stdbool.h>
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
// Multiple-producer single-consumer lock free queue, based upon the
// implementation from Dmitry Vyukov here:
@@ -84,8 +82,6 @@
// Pop a node. Returns NULL only if the queue was empty at some point after
// calling this function
gpr_mpscq_node* gpr_locked_mpscq_pop(gpr_locked_mpscq* q);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MPSCQ_H */
diff --git a/src/core/lib/support/murmur_hash.h b/src/core/lib/support/murmur_hash.h
index d02bba6..c28e58a 100644
--- a/src/core/lib/support/murmur_hash.h
+++ b/src/core/lib/support/murmur_hash.h
@@ -23,15 +23,11 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* compute the hash of key (length len) */
uint32_t gpr_murmur_hash3(const void* key, size_t len, uint32_t seed);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H */
diff --git a/src/core/lib/support/stack_lockfree.h b/src/core/lib/support/stack_lockfree.h
index 337ecc2..ebefc75 100644
--- a/src/core/lib/support/stack_lockfree.h
+++ b/src/core/lib/support/stack_lockfree.h
@@ -21,9 +21,7 @@
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct gpr_stack_lockfree gpr_stack_lockfree;
@@ -39,8 +37,6 @@
/* Returns -1 on empty or the actual entry number */
int gpr_stack_lockfree_pop(gpr_stack_lockfree* stack);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H */
diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h
index 0b18ffc..8f95f89 100644
--- a/src/core/lib/support/string.h
+++ b/src/core/lib/support/string.h
@@ -24,9 +24,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* String utility functions */
@@ -109,8 +107,6 @@
/** Return true if lower(s) equals "true", "yes" or "1", otherwise false. */
bool gpr_is_true(const char* s);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */
diff --git a/src/core/lib/support/string_windows.h b/src/core/lib/support/string_windows.h
index 6771647..18932e2 100644
--- a/src/core/lib/support/string_windows.h
+++ b/src/core/lib/support/string_windows.h
@@ -21,9 +21,7 @@
#include <grpc/support/port_platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
#ifdef GPR_WINDOWS
@@ -33,8 +31,6 @@
#endif /* GPR_WINDOWS */
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H */
diff --git a/src/core/lib/support/time_posix.cc b/src/core/lib/support/time_posix.cc
index 7f65205..47a8494 100644
--- a/src/core/lib/support/time_posix.cc
+++ b/src/core/lib/support/time_posix.cc
@@ -127,9 +127,7 @@
}
#endif
-extern "C" {
gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
-}
#ifdef GPR_LOW_LEVEL_COUNTERS
gpr_atm gpr_now_call_count;
diff --git a/src/core/lib/support/time_precise.h b/src/core/lib/support/time_precise.h
index 3befda3..650df6c 100644
--- a/src/core/lib/support/time_precise.h
+++ b/src/core/lib/support/time_precise.h
@@ -21,15 +21,11 @@
#include <grpc/support/time.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
void gpr_precise_clock_init(void);
void gpr_precise_clock_now(gpr_timespec* clk);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H */
diff --git a/src/core/lib/support/time_windows.cc b/src/core/lib/support/time_windows.cc
index 08c1b22..fb17e5c 100644
--- a/src/core/lib/support/time_windows.cc
+++ b/src/core/lib/support/time_windows.cc
@@ -68,9 +68,7 @@
return now_tv;
}
-extern "C" {
gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
-}
gpr_timespec gpr_now(gpr_clock_type clock_type) {
return gpr_now_impl(clock_type);
diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h
index 437d871..e28f4cb 100644
--- a/src/core/lib/support/tmpfile.h
+++ b/src/core/lib/support/tmpfile.h
@@ -21,9 +21,7 @@
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* Creates a temporary file from a prefix.
If tmp_filename is not NULL, *tmp_filename is assigned the name of the
@@ -31,8 +29,6 @@
unless an error occurs in which case it will be set to NULL. */
FILE* gpr_tmpfile(const char* prefix, char** tmp_filename);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_TMPFILE_H */