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

reviewable/pr12692/r4
Yash Tibrewal 8 years ago
parent a7e6d65a48
commit 53a47f09e2
  1. 8
      include/grpc/support/avl.h
  2. 8
      src/core/lib/iomgr/iomgr_uv.h
  3. 1
      src/core/lib/iomgr/network_status_tracker.c
  4. 4
      src/core/lib/iomgr/wakeup_fd_cv.h
  5. 1
      src/core/lib/iomgr/wakeup_fd_pipe.c
  6. 8
      src/core/lib/iomgr/wakeup_fd_pipe.h
  7. 1
      src/core/lib/iomgr/wakeup_fd_posix.c
  8. 8
      src/core/lib/security/credentials/google_default/google_default_credentials.h
  9. 8
      src/core/lib/security/transport/auth_filters.h
  10. 8
      src/core/lib/surface/alarm_internal.h
  11. 8
      src/core/lib/surface/api_trace.h
  12. 8
      src/core/lib/surface/lame_client.h
  13. 1
      src/core/lib/surface/validate_metadata.c

@ -21,6 +21,10 @@
#include <grpc/support/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/** internal node of an AVL tree */
typedef struct gpr_avl_node {
gpr_refcount refs;
@ -91,4 +95,8 @@ 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 */

@ -23,10 +23,18 @@
#include <grpc/support/thd.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The thread ID of the thread on which grpc was initialized. Used to verify
* that all calls into libuv are made on that same thread */
extern gpr_thd_id g_init_thread;
#ifdef __cplusplus
}
#endif
#ifdef GRPC_UV_THREAD_CHECK
#define GRPC_UV_ASSERT_SAME_THREAD() \
GPR_ASSERT(gpr_thd_currentid() == g_init_thread)

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

@ -66,8 +66,10 @@ typedef struct cv_fd_table {
grpc_poll_function_type poll;
} cv_fd_table;
extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */

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

@ -21,6 +21,14 @@
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#ifdef __cplusplus
extern "C" {
#endif
extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H */

@ -25,7 +25,6 @@
#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL;
int grpc_allow_specialized_wakeup_fd = 1;

@ -23,6 +23,10 @@
#include "src/core/lib/security/credentials/credentials.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud"
#define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \
"application_default_credentials.json"
@ -41,5 +45,9 @@
void grpc_flush_cached_google_default_credentials(void);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H \
*/

@ -21,7 +21,15 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_client_auth_filter;
extern const grpc_channel_filter grpc_server_auth_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */

@ -22,6 +22,10 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_alarm_refcount;
@ -37,4 +41,8 @@ extern grpc_tracer_flag grpc_trace_alarm_refcount;
#endif /* defined(NDEBUG) */
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H */

@ -22,6 +22,10 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
#ifdef __cplusplus
extern "C" {
#endif
extern grpc_tracer_flag grpc_api_trace;
/* Provide unwrapping macros because we're in C89 and variadic macros weren't
@ -47,4 +51,8 @@ extern grpc_tracer_flag grpc_api_trace;
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_SURFACE_API_TRACE_H */

@ -21,6 +21,14 @@
#include "src/core/lib/channel/channel_stack.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const grpc_channel_filter grpc_lame_filter;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */

@ -26,6 +26,7 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/surface/validate_metadata.h"
static grpc_error *conforms_to(grpc_slice slice, const uint8_t *legal_bits,
const char *err_desc) {

Loading…
Cancel
Save