Skip to content

Commit

Permalink
Add a sanity check for inclusion of port_platform.h
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn committed Feb 23, 2018
1 parent a90d718 commit db3e898
Show file tree
Hide file tree
Showing 501 changed files with 1,061 additions and 52 deletions.
2 changes: 2 additions & 0 deletions include/grpc/byte_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_BYTE_BUFFER_H
#define GRPC_BYTE_BUFFER_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/slice_buffer.h>

Expand Down
2 changes: 2 additions & 0 deletions include/grpc/byte_buffer_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_BYTE_BUFFER_READER_H
#define GRPC_BYTE_BUFFER_READER_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/byte_buffer_reader.h>

#endif /* GRPC_BYTE_BUFFER_READER_H */
2 changes: 2 additions & 0 deletions include/grpc/census.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CENSUS_H
#define GRPC_CENSUS_H

#include <grpc/support/port_platform.h>

#include <grpc/grpc.h>

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/fork.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_FORK_H
#define GRPC_FORK_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/fork.h>

#endif /* GRPC_FORK_H */
2 changes: 2 additions & 0 deletions include/grpc/grpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_GRPC_H
#define GRPC_GRPC_H

#include <grpc/support/port_platform.h>

#include <grpc/status.h>

#include <grpc/byte_buffer.h>
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/grpc_cronet.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_GRPC_CRONET_H
#define GRPC_GRPC_CRONET_H

#include <grpc/support/port_platform.h>

#include <grpc/grpc.h>

#ifdef __cplusplus
Expand Down
3 changes: 2 additions & 1 deletion include/grpc/grpc_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#ifndef GRPC_GRPC_POSIX_H
#define GRPC_GRPC_POSIX_H

#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/grpc_types.h>

#include <stddef.h>

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/grpc_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_GRPC_SECURITY_H
#define GRPC_GRPC_SECURITY_H

#include <grpc/support/port_platform.h>

#include <grpc/grpc.h>
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/impl/codegen/byte_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H

#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/grpc_types.h>

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions include/grpc/impl/codegen/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern "C" {

/* Platform-specific type declarations of gpr_mu and gpr_cv. */
#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/sync_generic.h>

#if defined(GPR_POSIX_SYNC)
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/impl/codegen/sync_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_IMPL_CODEGEN_SYNC_CUSTOM_H
#define GRPC_IMPL_CODEGEN_SYNC_CUSTOM_H

#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/sync_generic.h>

/* Users defining GPR_CUSTOM_SYNC need to define the following macros. */
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/impl/codegen/sync_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#define GRPC_IMPL_CODEGEN_SYNC_GENERIC_H
/* Generic type defintions for gpr_sync. */

#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/atm.h>

/* gpr_event */
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/impl/codegen/sync_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_IMPL_CODEGEN_SYNC_POSIX_H
#define GRPC_IMPL_CODEGEN_SYNC_POSIX_H

#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/sync_generic.h>

#include <pthread.h>
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/impl/codegen/sync_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H
#define GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H

#include <grpc/impl/codegen/port_platform.h>

#include <grpc/impl/codegen/sync_generic.h>

typedef struct {
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SLICE_H
#define GRPC_SLICE_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/slice.h>
#include <grpc/support/sync.h>

Expand Down
2 changes: 2 additions & 0 deletions include/grpc/slice_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SLICE_BUFFER_H
#define GRPC_SLICE_BUFFER_H

#include <grpc/support/port_platform.h>

#include <grpc/slice.h>

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_STATUS_H
#define GRPC_STATUS_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/status.h>

#endif /* GRPC_STATUS_H */
4 changes: 2 additions & 2 deletions include/grpc/support/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#ifndef GRPC_SUPPORT_ALLOC_H
#define GRPC_SUPPORT_ALLOC_H

#include <stddef.h>
#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/port_platform.h>
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/support/atm.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_ATM_H
#define GRPC_SUPPORT_ATM_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/atm.h>

#endif /* GRPC_SUPPORT_ATM_H */
2 changes: 2 additions & 0 deletions include/grpc/support/atm_gcc_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H
#define GRPC_SUPPORT_ATM_GCC_ATOMIC_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/atm_gcc_atomic.h>

#endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */
2 changes: 2 additions & 0 deletions include/grpc/support/atm_gcc_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_ATM_GCC_SYNC_H
#define GRPC_SUPPORT_ATM_GCC_SYNC_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/atm_gcc_sync.h>

#endif /* GRPC_SUPPORT_ATM_GCC_SYNC_H */
2 changes: 2 additions & 0 deletions include/grpc/support/atm_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_ATM_WINDOWS_H
#define GRPC_SUPPORT_ATM_WINDOWS_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/atm_windows.h>

#endif /* GRPC_SUPPORT_ATM_WINDOWS_H */
1 change: 1 addition & 0 deletions include/grpc/support/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define GRPC_SUPPORT_LOG_H

#include <grpc/impl/codegen/port_platform.h>

#include <inttypes.h>
#include <stdarg.h>
#include <stdlib.h> /* for abort() */
Expand Down
2 changes: 2 additions & 0 deletions include/grpc/support/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_SYNC_H
#define GRPC_SUPPORT_SYNC_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h>

Expand Down
2 changes: 2 additions & 0 deletions include/grpc/support/sync_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_SYNC_CUSTOM_H
#define GRPC_SUPPORT_SYNC_CUSTOM_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/sync_custom.h>

#endif /* GRPC_SUPPORT_SYNC_CUSTOM_H */
2 changes: 2 additions & 0 deletions include/grpc/support/sync_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_SYNC_GENERIC_H
#define GRPC_SUPPORT_SYNC_GENERIC_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/sync_generic.h>

#endif /* GRPC_SUPPORT_SYNC_GENERIC_H */
2 changes: 2 additions & 0 deletions include/grpc/support/sync_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_SYNC_POSIX_H
#define GRPC_SUPPORT_SYNC_POSIX_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/sync_posix.h>

#endif /* GRPC_SUPPORT_SYNC_POSIX_H */
2 changes: 2 additions & 0 deletions include/grpc/support/sync_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_SYNC_WINDOWS_H
#define GRPC_SUPPORT_SYNC_WINDOWS_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/sync_windows.h>

#endif /* GRPC_SUPPORT_SYNC_WINDOWS_H */
2 changes: 2 additions & 0 deletions include/grpc/support/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_SUPPORT_TIME_H
#define GRPC_SUPPORT_TIME_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/gpr_types.h>

#include <stddef.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/census/grpc_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include <grpc/census.h>
#include <grpc/grpc.h>
#include "src/core/lib/surface/api_trace.h"
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/backup_poller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/backup_poller.h"

#include <grpc/grpc.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/backup_poller.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKUP_POLLER_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKUP_POLLER_H

#include <grpc/support/port_platform.h>

#include <grpc/grpc.h>
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/exec_ctx.h"
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/channel_connectivity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/lib/surface/channel.h"

#include <inttypes.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/client_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/client_channel_factory.h"
#include "src/core/ext/filters/client_channel/resolver.h"
#include "src/core/lib/channel/channel_stack.h"
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/client_channel_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/client_channel_factory.h"
#include "src/core/lib/channel/channel_args.h"

Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/client_channel_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H

#include <grpc/support/port_platform.h>

#include <grpc/impl/codegen/grpc_types.h>

#include "src/core/ext/filters/client_channel/subchannel.h"
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/connector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/connector.h"

grpc_connector* grpc_connector_ref(grpc_connector* connector) {
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H

#include <grpc/support/port_platform.h>

#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/transport/transport.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"

#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/http_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/http_proxy.h"

#include <stdbool.h>
Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/lb_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/lb_policy.h"
#include "src/core/lib/iomgr/combiner.h"

Expand Down
2 changes: 2 additions & 0 deletions src/core/ext/filters/client_channel/lb_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/client_channel_factory.h"
#include "src/core/ext/filters/client_channel/subchannel.h"
#include "src/core/lib/gprpp/abstract.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h"

#include <grpc/support/atm.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H

#include <grpc/support/port_platform.h>

#include "src/core/lib/channel/channel_stack.h"

extern const grpc_channel_filter grpc_client_load_reporting_filter;
Expand Down
Loading

0 comments on commit db3e898

Please sign in to comment.