Standardize on grpc/support/port_platform.h usage in src/core/... (#27568)

pull/27569/head^2
Craig Tiller 3 years ago committed by GitHub
parent b50b59c582
commit 79097afb56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 2
      src/core/ext/filters/client_channel/http_connect_handshaker.h
  3. 2
      src/core/ext/transport/binder/client/channel_create.cc
  4. 2
      src/core/ext/transport/binder/client/channel_create.h
  5. 2
      src/core/ext/transport/binder/client/channel_create_impl.cc
  6. 2
      src/core/ext/transport/binder/client/channel_create_impl.h
  7. 2
      src/core/ext/transport/binder/client/jni_utils.cc
  8. 2
      src/core/ext/transport/binder/client/jni_utils.h
  9. 2
      src/core/ext/transport/binder/server/binder_server.cc
  10. 2
      src/core/ext/transport/binder/server/binder_server.h
  11. 2
      src/core/ext/transport/binder/server/binder_server_credentials.cc
  12. 2
      src/core/ext/transport/binder/server/binder_server_credentials.h
  13. 2
      src/core/ext/transport/binder/transport/binder_stream.h
  14. 2
      src/core/ext/transport/binder/transport/binder_transport.h
  15. 2
      src/core/ext/transport/binder/utils/transport_stream_receiver.h
  16. 2
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc
  17. 2
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h
  18. 2
      src/core/ext/transport/binder/wire_format/binder.h
  19. 2
      src/core/ext/transport/binder/wire_format/binder_android.cc
  20. 2
      src/core/ext/transport/binder/wire_format/binder_android.h
  21. 2
      src/core/ext/transport/binder/wire_format/binder_constants.cc
  22. 2
      src/core/ext/transport/binder/wire_format/binder_constants.h
  23. 2
      src/core/ext/transport/binder/wire_format/transaction.cc
  24. 2
      src/core/ext/transport/binder/wire_format/transaction.h
  25. 2
      src/core/ext/transport/binder/wire_format/wire_reader.h
  26. 2
      src/core/ext/transport/binder/wire_format/wire_reader_impl.cc
  27. 2
      src/core/ext/transport/binder/wire_format/wire_reader_impl.h
  28. 2
      src/core/ext/transport/binder/wire_format/wire_writer.cc
  29. 2
      src/core/ext/transport/binder/wire_format/wire_writer.h
  30. 2
      src/core/ext/transport/chttp2/transport/hpack_constants.h
  31. 2
      src/core/ext/transport/chttp2/transport/hpack_encoder_index.h
  32. 2
      src/core/ext/transport/chttp2/transport/popularity_count.h
  33. 2
      src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
  34. 2
      src/core/ext/transport/cronet/transport/cronet_status.cc
  35. 2
      src/core/ext/transport/cronet/transport/cronet_status.h
  36. 2
      src/core/lib/channel/channel_trace.cc
  37. 2
      src/core/lib/channel/channel_trace.h
  38. 2
      src/core/lib/channel/channelz.cc
  39. 2
      src/core/lib/channel/channelz.h
  40. 2
      src/core/lib/channel/channelz_registry.cc
  41. 2
      src/core/lib/channel/channelz_registry.h
  42. 2
      src/core/lib/config/core_configuration.h
  43. 2
      src/core/lib/gpr/tls.h
  44. 2
      src/core/lib/gpr/useful.h
  45. 2
      src/core/lib/gprpp/bitset.h
  46. 2
      src/core/lib/gprpp/capture.h
  47. 2
      src/core/lib/gprpp/construct_destruct.h
  48. 2
      src/core/lib/gprpp/match.h
  49. 2
      src/core/lib/gprpp/overload.h
  50. 2
      src/core/lib/gprpp/table.h
  51. 2
      src/core/lib/promise/activity.cc
  52. 2
      src/core/lib/promise/activity.h
  53. 2
      src/core/lib/promise/context.h
  54. 2
      src/core/lib/promise/detail/basic_join.h
  55. 2
      src/core/lib/promise/detail/basic_seq.h
  56. 2
      src/core/lib/promise/detail/promise_factory.h
  57. 2
      src/core/lib/promise/detail/promise_like.h
  58. 2
      src/core/lib/promise/detail/status.h
  59. 2
      src/core/lib/promise/detail/switch.h
  60. 2
      src/core/lib/promise/exec_ctx_wakeup_scheduler.h
  61. 2
      src/core/lib/promise/for_each.h
  62. 2
      src/core/lib/promise/if.h
  63. 2
      src/core/lib/promise/intra_activity_waiter.h
  64. 2
      src/core/lib/promise/join.h
  65. 2
      src/core/lib/promise/latch.h
  66. 2
      src/core/lib/promise/loop.h
  67. 2
      src/core/lib/promise/map.h
  68. 2
      src/core/lib/promise/observable.h
  69. 2
      src/core/lib/promise/pipe.h
  70. 2
      src/core/lib/promise/poll.h
  71. 2
      src/core/lib/promise/promise.h
  72. 2
      src/core/lib/promise/race.h
  73. 2
      src/core/lib/promise/seq.h
  74. 2
      src/core/lib/promise/try_join.h
  75. 2
      src/core/lib/promise/try_seq.h
  76. 2
      src/core/lib/promise/wait_set.h
  77. 2
      src/core/lib/surface/builtins.cc
  78. 2
      src/core/lib/surface/builtins.h
  79. 19
      tools/run_tests/sanity/check_port_platform.py

@ -803,6 +803,7 @@ grpc_cc_library(
language = "c++",
public_hdrs = [
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/support/port_platform.h",
],
)

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/config/core_configuration.h"

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/channel_create.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#ifdef GPR_ANDROID

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/channel_create_impl.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_IMPL_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_IMPL_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/lib/channel/channel_args.h"

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/jni_utils.h"

@ -17,7 +17,7 @@
#if defined(ANDROID) || defined(__ANDROID__)
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <jni.h>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/server/binder_server.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <string>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/security/server_credentials.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_CREDENTIALS_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_CREDENTIALS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/security/server_credentials.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_STREAM_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_STREAM_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <memory>
#include <string>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <functional>
#include <string>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <functional>
#include <map>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <cstdint>
#include <functional>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#ifdef GPR_SUPPORT_BINDER_TRANSPORT

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_ANDROID_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_ANDROID_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#ifdef GPR_SUPPORT_BINDER_TRANSPORT

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder_constants.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/base/attributes.h"

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/transaction.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <string>
#include <vector>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <memory>
#include <utility>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <memory>
#include <utility>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/wire_writer.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H
#define GRPC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <string>
#include <vector>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_CONSTANTS_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_CONSTANTS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <stdint.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_INDEX_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_INDEX_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/types/optional.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_POPULARITY_COUNT_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_POPULARITY_COUNT_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
namespace grpc_core {

@ -16,7 +16,7 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/cronet/client/secure/cronet_channel_create.h"

@ -16,7 +16,7 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/cronet/transport/cronet_status.h"

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CRONET_TRANSPORT_CRONET_STATUS_H
#define GRPC_CORE_EXT_TRANSPORT_CRONET_TRANSPORT_CRONET_STATUS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <grpc/status.h>

@ -16,7 +16,7 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_trace.h"

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#define GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <grpc/grpc.h>

@ -16,7 +16,7 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
#define GRPC_CORE_LIB_CHANNEL_CHANNELZ_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <atomic>
#include <set>

@ -16,7 +16,7 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz_registry.h"

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#define GRPC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <stdint.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_CONFIG_CORE_CONFIGURATION_H
#define GRPC_CORE_LIB_CONFIG_CORE_CONFIGURATION_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <atomic>

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_LIB_GPR_TLS_H
#define GRPC_CORE_LIB_GPR_TLS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <type_traits>

@ -19,7 +19,7 @@
#ifndef GRPC_CORE_LIB_GPR_USEFUL_H
#define GRPC_CORE_LIB_GPR_USEFUL_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <cstddef>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_BITSET_H
#define GRPC_CORE_LIB_GPRPP_BITSET_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_CAPTURE_H
#define GRPC_CORE_LIB_GPRPP_CAPTURE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <tuple>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_CONSTRUCT_DESTRUCT_H
#define GRPC_CORE_LIB_GPRPP_CONSTRUCT_DESTRUCT_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_MATCH_H
#define GRPC_CORE_LIB_GPRPP_MATCH_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_OVERLOAD_H
#define GRPC_CORE_LIB_GPRPP_OVERLOAD_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_GPRPP_TABLE_H
#define GRPC_CORE_LIB_GPRPP_TABLE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/promise/activity.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_ACTIVITY_H
#define GRPC_CORE_LIB_PROMISE_ACTIVITY_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <functional>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_CONTEXT_H
#define GRPC_CORE_LIB_PROMISE_CONTEXT_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_BASIC_JOIN_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_BASIC_JOIN_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <tuple>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <cassert>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_PROMISE_FACTORY_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_PROMISE_FACTORY_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/meta/type_traits.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_PROMISE_LIKE_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_PROMISE_LIKE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <utility>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_STATUS_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_STATUS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"

@ -21,7 +21,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_DETAIL_SWITCH_H
#define GRPC_CORE_LIB_PROMISE_DETAIL_SWITCH_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <stdlib.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_EXEC_CTX_WAKEUP_SCHEDULER_H
#define GRPC_CORE_LIB_PROMISE_EXEC_CTX_WAKEUP_SCHEDULER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/exec_ctx.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_FOR_EACH_H
#define GRPC_CORE_LIB_PROMISE_FOR_EACH_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/status/status.h"
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_IF_H
#define GRPC_CORE_LIB_PROMISE_IF_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/status/statusor.h"
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_INTRA_ACTIVITY_WAITER_H
#define GRPC_CORE_LIB_PROMISE_INTRA_ACTIVITY_WAITER_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/promise/activity.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_JOIN_H
#define GRPC_CORE_LIB_PROMISE_JOIN_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/promise/detail/basic_join.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_LATCH_H
#define GRPC_CORE_LIB_PROMISE_LATCH_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/log.h>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_LOOP_H
#define GRPC_CORE_LIB_PROMISE_LOOP_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_MAP_H
#define GRPC_CORE_LIB_PROMISE_MAP_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <tuple>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_OBSERVABLE_H
#define GRPC_CORE_LIB_PROMISE_OBSERVABLE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <limits>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_PIPE_H
#define GRPC_CORE_LIB_PROMISE_PIPE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_POLL_H
#define GRPC_CORE_LIB_PROMISE_POLL_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_PROMISE_H
#define GRPC_CORE_LIB_PROMISE_PROMISE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <functional>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_RACE_H
#define GRPC_CORE_LIB_PROMISE_RACE_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <tuple>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_SEQ_H
#define GRPC_CORE_LIB_PROMISE_SEQ_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/types/variant.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_TRY_JOIN_H
#define GRPC_CORE_LIB_PROMISE_TRY_JOIN_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/promise/detail/basic_join.h"
#include "src/core/lib/promise/detail/status.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_TRY_SEQ_H
#define GRPC_CORE_LIB_PROMISE_TRY_SEQ_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include <tuple>

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_PROMISE_WAIT_SET_H
#define GRPC_CORE_LIB_PROMISE_WAIT_SET_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "absl/container/flat_hash_set.h"

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/surface/builtins.h"

@ -15,7 +15,7 @@
#ifndef GRPC_CORE_LIB_SURFACE_BUILTINS_H
#define GRPC_CORE_LIB_SURFACE_BUILTINS_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/config/core_configuration.h"

@ -20,7 +20,7 @@ import sys
os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '../../..'))
def check_port_platform_inclusion(directory_root):
def check_port_platform_inclusion(directory_root, legal_list):
bad_files = []
for root, dirs, files in os.walk(directory_root):
for filename in files:
@ -45,10 +45,7 @@ def check_port_platform_inclusion(directory_root):
all_lines_in_file = f.readlines()
for index, l in enumerate(all_lines_in_file):
if '#include' in l:
if l not in [
'#include <grpc/support/port_platform.h>\n',
'#include <grpc/impl/codegen/port_platform.h>\n'
]:
if l not in legal_list:
bad_files.append(path)
elif all_lines_in_file[index + 1] != '\n':
# Require a blank line after including port_platform.h in
@ -60,8 +57,14 @@ def check_port_platform_inclusion(directory_root):
all_bad_files = []
all_bad_files += check_port_platform_inclusion(os.path.join('src', 'core'))
all_bad_files += check_port_platform_inclusion(os.path.join('include', 'grpc'))
all_bad_files += check_port_platform_inclusion(os.path.join('src', 'core'), [
'#include <grpc/support/port_platform.h>\n',
])
all_bad_files += check_port_platform_inclusion(os.path.join(
'include', 'grpc'), [
'#include <grpc/support/port_platform.h>\n',
'#include <grpc/impl/codegen/port_platform.h>\n',
])
if sys.argv[1:] == ['--fix']:
for path in all_bad_files:
@ -70,7 +73,7 @@ if sys.argv[1:] == ['--fix']:
with open(path) as f:
for l in f.readlines():
if not found and '#include' in l:
text += '#include <grpc/impl/codegen/port_platform.h>\n\n'
text += '#include <grpc/support/port_platform.h>\n\n'
found = True
text += l
with open(path, 'w') as f:

Loading…
Cancel
Save