Changes for C to C++. Adding extern C to header files for compatibility.

reviewable/pr12692/r4
Yash Tibrewal 7 years ago
parent 53a47f09e2
commit 1c9b584a15
  1. 6
      CMakeLists.txt
  2. 10
      Makefile
  3. 2
      binding.gyp
  4. 2
      config.m4
  5. 2
      config.w32
  6. 2
      gRPC-Core.podspec
  7. 2
      grpc.gemspec
  8. 4
      grpc.gyp
  9. 2
      package.xml
  10. 6
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
  11. 4
      src/core/ext/filters/http/http_filters_plugin.c
  12. 8
      src/core/lib/debug/stats_data.h
  13. 1
      src/core/lib/debug/trace.c
  14. 8
      src/core/lib/iomgr/gethostname.h
  15. 2
      src/core/lib/iomgr/network_status_tracker.c
  16. 2
      src/core/lib/iomgr/wakeup_fd_cv.h
  17. 2
      src/core/lib/iomgr/wakeup_fd_pipe.c
  18. 2
      src/core/lib/iomgr/wakeup_fd_pipe.h
  19. 1
      src/core/lib/security/credentials/jwt/json_token.c
  20. 2
      src/core/lib/support/log.c
  21. 2
      src/core/lib/support/log_linux.c
  22. 2
      src/core/lib/support/log_posix.c
  23. 2
      src/core/lib/support/log_windows.c
  24. 1
      src/core/lib/surface/call.c
  25. 0
      src/core/lib/surface/version.cc
  26. 24
      src/core/plugin_registry/grpc_cronet_plugin_registry.cc
  27. 72
      src/core/plugin_registry/grpc_plugin_registry.cc
  28. 68
      src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
  29. 2
      src/python/grpcio/grpc_core_dependencies.py
  30. 0
      templates/src/core/lib/surface/version.cc.template
  31. 6
      templates/src/core/plugin_registry.template
  32. 2
      tools/buildgen/plugins/expand_filegroups.py
  33. 2
      tools/doxygen/Doxyfile.core.internal

@ -1214,7 +1214,7 @@ add_library(grpc
src/core/ext/filters/message_size/message_size_filter.c
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
src/core/ext/filters/workarounds/workaround_utils.c
src/core/plugin_registry/grpc_plugin_registry.c
src/core/plugin_registry/grpc_plugin_registry.cc
)
if(WIN32 AND MSVC)
@ -1523,7 +1523,7 @@ add_library(grpc_cronet
src/core/ext/transport/chttp2/client/chttp2_connector.c
src/core/ext/filters/load_reporting/server_load_reporting_filter.c
src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
src/core/plugin_registry/grpc_cronet_plugin_registry.c
src/core/plugin_registry/grpc_cronet_plugin_registry.cc
)
if(WIN32 AND MSVC)
@ -2364,7 +2364,7 @@ add_library(grpc_unsecure
src/core/ext/filters/message_size/message_size_filter.c
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
src/core/ext/filters/workarounds/workaround_utils.c
src/core/plugin_registry/grpc_unsecure_plugin_registry.c
src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
)
if(WIN32 AND MSVC)

@ -3205,7 +3205,7 @@ LIBGRPC_SRC = \
src/core/ext/filters/message_size/message_size_filter.c \
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
src/core/ext/filters/workarounds/workaround_utils.c \
src/core/plugin_registry/grpc_plugin_registry.c \
src/core/plugin_registry/grpc_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@ -3514,7 +3514,7 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/transport/chttp2/client/chttp2_connector.c \
src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
src/core/plugin_registry/grpc_cronet_plugin_registry.c \
src/core/plugin_registry/grpc_cronet_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@ -4323,7 +4323,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/filters/message_size/message_size_filter.c \
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
src/core/ext/filters/workarounds/workaround_utils.c \
src/core/plugin_registry/grpc_unsecure_plugin_registry.c \
src/core/plugin_registry/grpc_unsecure_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@ -20188,8 +20188,8 @@ src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP)
src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP)
src/core/lib/security/util/json_util.c: $(OPENSSL_DEP)
src/core/lib/surface/init_secure.c: $(OPENSSL_DEP)
src/core/plugin_registry/grpc_cronet_plugin_registry.c: $(OPENSSL_DEP)
src/core/plugin_registry/grpc_plugin_registry.c: $(OPENSSL_DEP)
src/core/plugin_registry/grpc_cronet_plugin_registry.cc: $(OPENSSL_DEP)
src/core/plugin_registry/grpc_plugin_registry.cc: $(OPENSSL_DEP)
src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP)
src/core/tsi/gts_transport_security.c: $(OPENSSL_DEP)
src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP)

@ -916,7 +916,7 @@
'src/core/ext/filters/message_size/message_size_filter.c',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
'src/core/ext/filters/workarounds/workaround_utils.c',
'src/core/plugin_registry/grpc_plugin_registry.c',
'src/core/plugin_registry/grpc_plugin_registry.cc',
],
'conditions': [
['OS == "mac"', {

@ -345,7 +345,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/message_size/message_size_filter.c \
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
src/core/ext/filters/workarounds/workaround_utils.c \
src/core/plugin_registry/grpc_plugin_registry.c \
src/core/plugin_registry/grpc_plugin_registry.cc \
src/boringssl/err_data.c \
third_party/boringssl/crypto/aes/aes.c \
third_party/boringssl/crypto/aes/key_wrap.c \

@ -322,7 +322,7 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\message_size\\message_size_filter.c " +
"src\\core\\ext\\filters\\workarounds\\workaround_cronet_compression_filter.c " +
"src\\core\\ext\\filters\\workarounds\\workaround_utils.c " +
"src\\core\\plugin_registry\\grpc_plugin_registry.c " +
"src\\core\\plugin_registry\\grpc_plugin_registry.cc " +
"src\\boringssl\\err_data.c " +
"third_party\\boringssl\\crypto\\aes\\aes.c " +
"third_party\\boringssl\\crypto\\aes\\key_wrap.c " +

@ -727,7 +727,7 @@ Pod::Spec.new do |s|
'src/core/ext/filters/message_size/message_size_filter.c',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
'src/core/ext/filters/workarounds/workaround_utils.c',
'src/core/plugin_registry/grpc_plugin_registry.c'
'src/core/plugin_registry/grpc_plugin_registry.cc'
ss.private_header_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/arena.h',

@ -667,7 +667,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/message_size/message_size_filter.c )
s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c )
s.files += %w( src/core/ext/filters/workarounds/workaround_utils.c )
s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c )
s.files += %w( src/core/plugin_registry/grpc_plugin_registry.cc )
s.files += %w( third_party/boringssl/crypto/aes/internal.h )
s.files += %w( third_party/boringssl/crypto/asn1/asn1_locl.h )
s.files += %w( third_party/boringssl/crypto/bio/internal.h )

@ -482,7 +482,7 @@
'src/core/ext/filters/message_size/message_size_filter.c',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
'src/core/ext/filters/workarounds/workaround_utils.c',
'src/core/plugin_registry/grpc_plugin_registry.c',
'src/core/plugin_registry/grpc_plugin_registry.cc',
],
},
{
@ -1148,7 +1148,7 @@
'src/core/ext/filters/message_size/message_size_filter.c',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
'src/core/ext/filters/workarounds/workaround_utils.c',
'src/core/plugin_registry/grpc_unsecure_plugin_registry.c',
'src/core/plugin_registry/grpc_unsecure_plugin_registry.cc',
],
},
{

@ -679,7 +679,7 @@
<file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.c" role="src" />
<file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.c" role="src" />
<file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn1_locl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/internal.h" role="src" />

@ -21,13 +21,13 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/channel/channel_args.h"
#define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \
"grpc.fake_resolver.response_generator"
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \
"grpc.fake_resolver.response_generator"
void grpc_resolver_fake_init();
// Instances of \a grpc_fake_resolver_response_generator are passed to the

@ -64,7 +64,7 @@ static bool maybe_add_required_filter(grpc_exec_ctx *exec_ctx,
: true;
}
void grpc_http_filters_init(void) {
extern "C" void grpc_http_filters_init(void) {
grpc_register_tracer(&grpc_compression_trace);
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
@ -86,4 +86,4 @@ void grpc_http_filters_init(void) {
maybe_add_required_filter, (void *)&grpc_http_server_filter);
}
void grpc_http_filters_shutdown(void) {}
extern "C" void grpc_http_filters_shutdown(void) {}

@ -24,10 +24,6 @@
#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,
@ -471,8 +467,4 @@ 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 */

@ -20,6 +20,7 @@
#include <string.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/support/env.h"

@ -19,16 +19,8 @@
#ifndef GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
#define GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
#ifdef __cplusplus
extern "C" {
#endif
// Returns the hostname of the local machine.
// Caller takes ownership of result.
char *grpc_gethostname();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H */

@ -16,8 +16,8 @@
*
*/
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/network_status_tracker.h"
#include "src/core/lib/iomgr/endpoint.h"
void grpc_network_status_shutdown(void) {}

@ -66,7 +66,7 @@ typedef struct cv_fd_table {
grpc_poll_function_type poll;
} cv_fd_table;
extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
extern const grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
#ifdef __cplusplus
}

@ -20,8 +20,8 @@
#ifdef GRPC_POSIX_WAKEUP_FD
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include <errno.h>
#include <string.h>

@ -25,7 +25,7 @@
extern "C" {
#endif
extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
extern const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
#ifdef __cplusplus
}

@ -20,6 +20,7 @@
#include <string.h>
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>

@ -27,7 +27,7 @@
#include <stdio.h>
#include <string.h>
extern void gpr_default_log(gpr_log_func_args *args);
extern "C" 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;

@ -56,7 +56,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
free(message);
}
void gpr_default_log(gpr_log_func_args *args) {
extern "C" void gpr_default_log(gpr_log_func_args *args) {
const char *final_slash;
char *prefix;
const char *display_file;

@ -57,7 +57,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
gpr_free(allocated);
}
void gpr_default_log(gpr_log_func_args *args) {
extern "C" void gpr_default_log(gpr_log_func_args *args) {
char *final_slash;
const char *display_file;
char time_buffer[64];

@ -65,7 +65,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
}
/* Simple starter implementation */
void gpr_default_log(gpr_log_func_args *args) {
extern "C" void gpr_default_log(gpr_log_func_args *args) {
char *final_slash;
const char *display_file;
char time_buffer[64];

@ -41,6 +41,7 @@
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/call_test_only.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/validate_metadata.h"

@ -18,18 +18,18 @@
#include <grpc/grpc.h>
extern void grpc_http_filters_init(void);
extern void grpc_http_filters_shutdown(void);
extern void grpc_chttp2_plugin_init(void);
extern void grpc_chttp2_plugin_shutdown(void);
extern void grpc_deadline_filter_init(void);
extern void grpc_deadline_filter_shutdown(void);
extern void grpc_client_channel_init(void);
extern void grpc_client_channel_shutdown(void);
extern void grpc_tsi_gts_init(void);
extern void grpc_tsi_gts_shutdown(void);
extern void grpc_server_load_reporting_plugin_init(void);
extern void grpc_server_load_reporting_plugin_shutdown(void);
extern "C" void grpc_http_filters_init(void);
extern "C" void grpc_http_filters_shutdown(void);
extern "C" void grpc_chttp2_plugin_init(void);
extern "C" void grpc_chttp2_plugin_shutdown(void);
extern "C" void grpc_deadline_filter_init(void);
extern "C" void grpc_deadline_filter_shutdown(void);
extern "C" void grpc_client_channel_init(void);
extern "C" void grpc_client_channel_shutdown(void);
extern "C" void grpc_tsi_gts_init(void);
extern "C" void grpc_tsi_gts_shutdown(void);
extern "C" void grpc_server_load_reporting_plugin_init(void);
extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,

@ -18,42 +18,42 @@
#include <grpc/grpc.h>
extern void grpc_http_filters_init(void);
extern void grpc_http_filters_shutdown(void);
extern void grpc_chttp2_plugin_init(void);
extern void grpc_chttp2_plugin_shutdown(void);
extern void grpc_tsi_gts_init(void);
extern void grpc_tsi_gts_shutdown(void);
extern void grpc_deadline_filter_init(void);
extern void grpc_deadline_filter_shutdown(void);
extern void grpc_client_channel_init(void);
extern void grpc_client_channel_shutdown(void);
extern void grpc_inproc_plugin_init(void);
extern void grpc_inproc_plugin_shutdown(void);
extern void grpc_resolver_fake_init(void);
extern void grpc_resolver_fake_shutdown(void);
extern void grpc_lb_policy_grpclb_init(void);
extern void grpc_lb_policy_grpclb_shutdown(void);
extern void grpc_lb_policy_pick_first_init(void);
extern void grpc_lb_policy_pick_first_shutdown(void);
extern void grpc_lb_policy_round_robin_init(void);
extern void grpc_lb_policy_round_robin_shutdown(void);
extern void grpc_resolver_dns_ares_init(void);
extern void grpc_resolver_dns_ares_shutdown(void);
extern void grpc_resolver_dns_native_init(void);
extern void grpc_resolver_dns_native_shutdown(void);
extern void grpc_resolver_sockaddr_init(void);
extern void grpc_resolver_sockaddr_shutdown(void);
extern void grpc_server_load_reporting_plugin_init(void);
extern void grpc_server_load_reporting_plugin_shutdown(void);
extern void census_grpc_plugin_init(void);
extern void census_grpc_plugin_shutdown(void);
extern void grpc_max_age_filter_init(void);
extern void grpc_max_age_filter_shutdown(void);
extern void grpc_message_size_filter_init(void);
extern void grpc_message_size_filter_shutdown(void);
extern void grpc_workaround_cronet_compression_filter_init(void);
extern void grpc_workaround_cronet_compression_filter_shutdown(void);
extern "C" void grpc_http_filters_init(void);
extern "C" void grpc_http_filters_shutdown(void);
extern "C" void grpc_chttp2_plugin_init(void);
extern "C" void grpc_chttp2_plugin_shutdown(void);
extern "C" void grpc_tsi_gts_init(void);
extern "C" void grpc_tsi_gts_shutdown(void);
extern "C" void grpc_deadline_filter_init(void);
extern "C" void grpc_deadline_filter_shutdown(void);
extern "C" void grpc_client_channel_init(void);
extern "C" void grpc_client_channel_shutdown(void);
extern "C" void grpc_inproc_plugin_init(void);
extern "C" void grpc_inproc_plugin_shutdown(void);
extern "C" void grpc_resolver_fake_init(void);
extern "C" void grpc_resolver_fake_shutdown(void);
extern "C" void grpc_lb_policy_grpclb_init(void);
extern "C" void grpc_lb_policy_grpclb_shutdown(void);
extern "C" void grpc_lb_policy_pick_first_init(void);
extern "C" void grpc_lb_policy_pick_first_shutdown(void);
extern "C" void grpc_lb_policy_round_robin_init(void);
extern "C" void grpc_lb_policy_round_robin_shutdown(void);
extern "C" void grpc_resolver_dns_ares_init(void);
extern "C" void grpc_resolver_dns_ares_shutdown(void);
extern "C" void grpc_resolver_dns_native_init(void);
extern "C" void grpc_resolver_dns_native_shutdown(void);
extern "C" void grpc_resolver_sockaddr_init(void);
extern "C" void grpc_resolver_sockaddr_shutdown(void);
extern "C" void grpc_server_load_reporting_plugin_init(void);
extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
extern "C" void census_grpc_plugin_init(void);
extern "C" void census_grpc_plugin_shutdown(void);
extern "C" void grpc_max_age_filter_init(void);
extern "C" void grpc_max_age_filter_shutdown(void);
extern "C" void grpc_message_size_filter_init(void);
extern "C" void grpc_message_size_filter_shutdown(void);
extern "C" void grpc_workaround_cronet_compression_filter_init(void);
extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,

@ -18,40 +18,40 @@
#include <grpc/grpc.h>
extern void grpc_http_filters_init(void);
extern void grpc_http_filters_shutdown(void);
extern void grpc_chttp2_plugin_init(void);
extern void grpc_chttp2_plugin_shutdown(void);
extern void grpc_deadline_filter_init(void);
extern void grpc_deadline_filter_shutdown(void);
extern void grpc_client_channel_init(void);
extern void grpc_client_channel_shutdown(void);
extern void grpc_inproc_plugin_init(void);
extern void grpc_inproc_plugin_shutdown(void);
extern void grpc_resolver_dns_ares_init(void);
extern void grpc_resolver_dns_ares_shutdown(void);
extern void grpc_resolver_dns_native_init(void);
extern void grpc_resolver_dns_native_shutdown(void);
extern void grpc_resolver_sockaddr_init(void);
extern void grpc_resolver_sockaddr_shutdown(void);
extern void grpc_resolver_fake_init(void);
extern void grpc_resolver_fake_shutdown(void);
extern void grpc_server_load_reporting_plugin_init(void);
extern void grpc_server_load_reporting_plugin_shutdown(void);
extern void grpc_lb_policy_grpclb_init(void);
extern void grpc_lb_policy_grpclb_shutdown(void);
extern void grpc_lb_policy_pick_first_init(void);
extern void grpc_lb_policy_pick_first_shutdown(void);
extern void grpc_lb_policy_round_robin_init(void);
extern void grpc_lb_policy_round_robin_shutdown(void);
extern void census_grpc_plugin_init(void);
extern void census_grpc_plugin_shutdown(void);
extern void grpc_max_age_filter_init(void);
extern void grpc_max_age_filter_shutdown(void);
extern void grpc_message_size_filter_init(void);
extern void grpc_message_size_filter_shutdown(void);
extern void grpc_workaround_cronet_compression_filter_init(void);
extern void grpc_workaround_cronet_compression_filter_shutdown(void);
extern "C" void grpc_http_filters_init(void);
extern "C" void grpc_http_filters_shutdown(void);
extern "C" void grpc_chttp2_plugin_init(void);
extern "C" void grpc_chttp2_plugin_shutdown(void);
extern "C" void grpc_deadline_filter_init(void);
extern "C" void grpc_deadline_filter_shutdown(void);
extern "C" void grpc_client_channel_init(void);
extern "C" void grpc_client_channel_shutdown(void);
extern "C" void grpc_inproc_plugin_init(void);
extern "C" void grpc_inproc_plugin_shutdown(void);
extern "C" void grpc_resolver_dns_ares_init(void);
extern "C" void grpc_resolver_dns_ares_shutdown(void);
extern "C" void grpc_resolver_dns_native_init(void);
extern "C" void grpc_resolver_dns_native_shutdown(void);
extern "C" void grpc_resolver_sockaddr_init(void);
extern "C" void grpc_resolver_sockaddr_shutdown(void);
extern "C" void grpc_resolver_fake_init(void);
extern "C" void grpc_resolver_fake_shutdown(void);
extern "C" void grpc_server_load_reporting_plugin_init(void);
extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
extern "C" void grpc_lb_policy_grpclb_init(void);
extern "C" void grpc_lb_policy_grpclb_shutdown(void);
extern "C" void grpc_lb_policy_pick_first_init(void);
extern "C" void grpc_lb_policy_pick_first_shutdown(void);
extern "C" void grpc_lb_policy_round_robin_init(void);
extern "C" void grpc_lb_policy_round_robin_shutdown(void);
extern "C" void census_grpc_plugin_init(void);
extern "C" void census_grpc_plugin_shutdown(void);
extern "C" void grpc_max_age_filter_init(void);
extern "C" void grpc_max_age_filter_shutdown(void);
extern "C" void grpc_message_size_filter_init(void);
extern "C" void grpc_message_size_filter_shutdown(void);
extern "C" void grpc_workaround_cronet_compression_filter_init(void);
extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,

@ -321,7 +321,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/filters/message_size/message_size_filter.c',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
'src/core/ext/filters/workarounds/workaround_utils.c',
'src/core/plugin_registry/grpc_plugin_registry.c',
'src/core/plugin_registry/grpc_plugin_registry.cc',
'src/boringssl/err_data.c',
'third_party/boringssl/crypto/aes/aes.c',
'third_party/boringssl/crypto/aes/key_wrap.c',

@ -2,7 +2,7 @@
---
foreach: libs
cond: selected.get('generate_plugin_registry', False)
output_name: ${selected.name}_plugin_registry.c
output_name: ${selected.name}_plugin_registry.cc
template: |
/*
*
@ -25,8 +25,8 @@ template: |
#include <grpc/grpc.h>
%for plugin in selected.plugins:
extern void ${plugin}_init(void);
extern void ${plugin}_shutdown(void);
extern "C" void ${plugin}_init(void);
extern "C" void ${plugin}_shutdown(void);
%endfor
void grpc_register_built_in_plugins(void) {

@ -146,7 +146,7 @@ def mako_plugin(dictionary):
lib[lst] = vals
lib['plugins'] = plugins
if lib.get('generate_plugin_registry', False):
lib['src'].append('src/core/plugin_registry/%s_plugin_registry.c' %
lib['src'].append('src/core/plugin_registry/%s_plugin_registry.cc' %
lib['name'])
for lst in FILEGROUP_LISTS:
lib[lst] = uniquify(lib.get(lst, []))

@ -1417,7 +1417,7 @@ src/core/lib/transport/transport.c \
src/core/lib/transport/transport.h \
src/core/lib/transport/transport_impl.h \
src/core/lib/transport/transport_op_string.c \
src/core/plugin_registry/grpc_plugin_registry.c \
src/core/plugin_registry/grpc_plugin_registry.cc \
src/core/tsi/README.md \
src/core/tsi/fake_transport_security.c \
src/core/tsi/fake_transport_security.h \

Loading…
Cancel
Save