move portability stuff into upb/port/

Also delete redundant system #includes that are already pulled in by port/def.inc

PiperOrigin-RevId: 486398989
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent 46699b72ad
commit f6307877d3
  1. 18
      BUILD
  2. 6
      bazel/amalgamate.py
  3. 8
      protos_generator/protoc-gen-upb-protos.cc
  4. 4
      python/convert.c
  5. 2
      upb/bindings/lua/msg.c
  6. 2
      upb/collections/array.c
  7. 4
      upb/collections/array.h
  8. 4
      upb/collections/array_internal.h
  9. 2
      upb/collections/map.c
  10. 4
      upb/collections/map.h
  11. 4
      upb/collections/map_gencode_util.h
  12. 4
      upb/collections/map_internal.h
  13. 2
      upb/collections/map_sorter.c
  14. 4
      upb/collections/map_sorter_internal.h
  15. 4
      upb/collections/message_value.h
  16. 3
      upb/conformance_upb.c
  17. 2
      upb/extension_registry.c
  18. 4
      upb/extension_registry.h
  19. 2
      upb/internal/atoi.c
  20. 4
      upb/internal/atoi.h
  21. 2
      upb/internal/table.c
  22. 4
      upb/internal/table.h
  23. 2
      upb/internal/unicode.c
  24. 4
      upb/internal/unicode.h
  25. 2
      upb/io/chunked_input_stream.c
  26. 4
      upb/io/chunked_input_stream.h
  27. 2
      upb/io/chunked_output_stream.c
  28. 4
      upb/io/chunked_output_stream.h
  29. 4
      upb/io/string.h
  30. 3
      upb/io/strtod.c
  31. 4
      upb/io/strtod.h
  32. 4
      upb/io/tokenizer.c
  33. 4
      upb/io/tokenizer.h
  34. 2
      upb/io/tokenizer_test.cc
  35. 4
      upb/io/zero_copy_input_stream.h
  36. 4
      upb/io/zero_copy_output_stream.h
  37. 2
      upb/json/decode.c
  38. 4
      upb/json/decode.h
  39. 5
      upb/json/encode.c
  40. 4
      upb/json/encode.h
  41. 2
      upb/mem/alloc.c
  42. 4
      upb/mem/alloc.h
  43. 2
      upb/mem/arena.c
  44. 4
      upb/mem/arena.h
  45. 4
      upb/mem/arena_internal.h
  46. 2
      upb/mini_table/accessors.c
  47. 4
      upb/mini_table/accessors.h
  48. 2
      upb/mini_table/common.c
  49. 4
      upb/mini_table/common.h
  50. 4
      upb/mini_table/common_internal.h
  51. 2
      upb/mini_table/decode.c
  52. 4
      upb/mini_table/decode.h
  53. 2
      upb/mini_table/encode.c
  54. 4
      upb/mini_table/encode_internal.h
  55. 2
      upb/msg.c
  56. 4
      upb/msg.h
  57. 4
      upb/msg_internal.h
  58. 10
      upb/port/def.inc
  59. 2
      upb/port/undef.inc
  60. 12
      upb/port/vsnprintf_compat.h
  61. 2
      upb/reflection/def_builder.c
  62. 4
      upb/reflection/def_builder_internal.h
  63. 2
      upb/reflection/def_builder_test.cc
  64. 5
      upb/reflection/def_pool.c
  65. 4
      upb/reflection/def_pool.h
  66. 4
      upb/reflection/def_pool_internal.h
  67. 2
      upb/reflection/def_type.c
  68. 4
      upb/reflection/def_type.h
  69. 2
      upb/reflection/desc_state.c
  70. 4
      upb/reflection/desc_state_internal.h
  71. 4
      upb/reflection/enum_def.c
  72. 4
      upb/reflection/enum_def.h
  73. 4
      upb/reflection/enum_def_internal.h
  74. 2
      upb/reflection/enum_value_def.c
  75. 4
      upb/reflection/enum_value_def.h
  76. 4
      upb/reflection/enum_value_def_internal.h
  77. 2
      upb/reflection/extension_range.c
  78. 4
      upb/reflection/extension_range.h
  79. 4
      upb/reflection/extension_range_internal.h
  80. 2
      upb/reflection/field_def.c
  81. 4
      upb/reflection/field_def.h
  82. 4
      upb/reflection/field_def_internal.h
  83. 2
      upb/reflection/file_def.c
  84. 4
      upb/reflection/file_def.h
  85. 4
      upb/reflection/file_def_internal.h
  86. 2
      upb/reflection/message.c
  87. 4
      upb/reflection/message.h
  88. 2
      upb/reflection/message_def.c
  89. 4
      upb/reflection/message_def.h
  90. 4
      upb/reflection/message_def_internal.h
  91. 2
      upb/reflection/method_def.c
  92. 4
      upb/reflection/method_def.h
  93. 4
      upb/reflection/method_def_internal.h
  94. 2
      upb/reflection/oneof_def.c
  95. 4
      upb/reflection/oneof_def.h
  96. 4
      upb/reflection/oneof_def_internal.h
  97. 2
      upb/reflection/service_def.c
  98. 4
      upb/reflection/service_def.h
  99. 4
      upb/reflection/service_def_internal.h
  100. 3
      upb/status.c
  101. Some files were not shown because too many files have changed in this diff Show More

18
BUILD

@ -99,12 +99,12 @@ package_group(
cc_library(
name = "port",
hdrs = [
"upb/internal/vsnprintf_compat.h",
"upb/port/vsnprintf_compat.h",
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
"upb/port_def.inc",
"upb/port_undef.inc",
"upb/port/def.inc",
"upb/port/undef.inc",
],
visibility = ["//:__subpackages__"],
)
@ -321,8 +321,8 @@ cc_library(
"upb/extension_registry.h",
"upb/msg.h",
"upb/msg_internal.h",
"upb/port_def.inc",
"upb/port_undef.inc",
"upb/port/def.inc",
"upb/port/undef.inc",
"upb/wire/decode.h",
"upb/wire/decode_fast.h",
"upb/wire/encode.h",
@ -342,8 +342,8 @@ cc_library(
hdrs = [
"upb/msg.h",
"upb/msg_internal.h",
"upb/port_def.inc",
"upb/port_undef.inc",
"upb/port/def.inc",
"upb/port/undef.inc",
"upb/upb.hpp",
"upb/wire/decode.h",
"upb/wire/decode_fast.h",
@ -376,8 +376,8 @@ cc_library(
"upb/reflection/service_def.h",
],
hdrs = [
"upb/port_def.inc",
"upb/port_undef.inc",
"upb/port/def.inc",
"upb/port/undef.inc",
"upb/reflection/def.h",
"upb/reflection/def_pool_internal.h",
],

@ -53,8 +53,8 @@ class Amalgamator:
self.output_h.write("/* Amalgamated source file */\n")
port_def = self._find_include_file("upb/port_def.inc")
port_undef = self._find_include_file("upb/port_undef.inc")
port_def = self._find_include_file("upb/port/def.inc")
port_undef = self._find_include_file("upb/port/undef.inc")
self._process_file(port_def, self.output_h)
self._process_file(port_def, self.output_c)
@ -88,7 +88,7 @@ class Amalgamator:
return False
if not (include.startswith("upb") or include.startswith("google")):
return False
if include and (include.endswith("port_def.inc") or include.endswith("port_undef.inc")):
if include and (include.endswith("port/def.inc") or include.endswith("port/undef.inc")):
# Skip, we handle this separately
return True
if include.endswith("hpp"):

@ -150,7 +150,7 @@ void WriteHeader(const FileLayout& layout, Output& output) {
}
}
output("#include \"upb/port_def.inc\"\n");
output("#include \"upb/port/def.inc\"\n");
const std::vector<const protobuf::Descriptor*> this_file_messages =
::upbc::SortedMessages(file);
@ -182,7 +182,7 @@ void WriteHeader(const FileLayout& layout, Output& output) {
WriteEndNamespace(file, output);
output("\n#include \"upb/port_undef.inc\"\n\n");
output("\n#include \"upb/port/undef.inc\"\n\n");
// End of "C" section.
output("#endif /* $0_UPB_PROTO_H_ */\n", ToPreproc(file->name()));
@ -207,7 +207,7 @@ void WriteSource(const FileLayout& layout, Output& output,
for (int i = 0; i < file->dependency_count(); i++) {
output("#include \"$0\"\n", CppHeaderFilename(file->dependency(i)));
}
output("#include \"upb/port_def.inc\"\n");
output("#include \"upb/port/def.inc\"\n");
WriteStartNamespace(file, output);
WriteMessageImplementations(file, output);
@ -216,7 +216,7 @@ void WriteSource(const FileLayout& layout, Output& output,
WriteExtensionIdentifiers(this_file_exts, output);
WriteEndNamespace(file, output);
output("#include \"upb/port_undef.inc\"\n\n");
output("#include \"upb/port/undef.inc\"\n\n");
}
void WriteMessageImplementations(const protobuf::FileDescriptor* file,

@ -34,7 +34,7 @@
#include "upb/util/compare.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
PyObject* PyUpb_UpbToPy(upb_MessageValue val, const upb_FieldDef* f,
PyObject* arena) {
@ -443,4 +443,4 @@ bool upb_Message_IsEqual(const upb_Message* msg1, const upb_Message* msg2,
kUpb_UnknownCompareResult_Equal;
}
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"

@ -42,7 +42,7 @@
#include "upb/json/decode.h"
#include "upb/json/encode.h"
#include "upb/map.h"
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#include "upb/reflection/message.h"
#include "upb/text_encode.h"

@ -30,7 +30,7 @@
#include "upb/collections/array_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static const char _upb_CTypeo_sizelg2[12] = {
0,

@ -31,7 +31,7 @@
#include "upb/collections/message_value.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -77,6 +77,6 @@ bool upb_Array_Resize(upb_Array* array, size_t size, upb_Arena* arena);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_ARRAY_H_ */

@ -33,7 +33,7 @@
#include "upb/collections/array.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -198,6 +198,6 @@ UPB_INLINE bool _upb_Array_Append_accessor(void* msg, size_t ofs,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_INTERNAL_ARRAY_INTERNAL_H_ */

@ -34,7 +34,7 @@
#include "upb/msg.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
/* Strings/bytes are special-cased in maps. */
static char _upb_CTypeo_mapsize[12] = {

@ -31,7 +31,7 @@
#include "upb/collections/message_value.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -109,6 +109,6 @@ void upb_MapIterator_SetValue(upb_Map* map, size_t iter,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_H_ */

@ -33,7 +33,7 @@
#include "upb/collections/map_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -117,6 +117,6 @@ UPB_INLINE void _upb_msg_map_set_value(void* msg, const void* val,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_GENCODE_UTIL_H_ */

@ -36,7 +36,7 @@
#include "upb/string_view.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_Map {
// Size of key and val, based on the map type.
@ -158,6 +158,6 @@ upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_INTERNAL_H_ */

@ -28,7 +28,7 @@
#include "upb/collections/map_sorter_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static void _upb_mapsorter_getkeys(const void* _a, const void* _b, void* a_key,
void* b_key, size_t size) {

@ -33,7 +33,7 @@
#include "upb/msg_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -88,6 +88,6 @@ bool _upb_mapsorter_pushmap(_upb_mapsorter* s, upb_FieldType key_type,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_SORTER_INTERNAL_H_ */

@ -33,7 +33,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct upb_Array upb_Array;
typedef struct upb_Map upb_Map;
@ -58,6 +58,6 @@ typedef union {
upb_Message* msg;
} upb_MutableMessageValue;
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MESSAGE_VALUE_H_ */

@ -31,7 +31,6 @@
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -47,7 +46,7 @@
#include "upb/wire/encode.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
int test_count = 0;
bool verbose = false; /* Set to true to get req/resp printed on stderr. */

@ -32,7 +32,7 @@
#include "upb/msg_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_ExtensionRegistry {
upb_Arena* arena;

@ -32,7 +32,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -97,6 +97,6 @@ const upb_MiniTable_Extension* upb_ExtensionRegistry_Lookup(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_EXTENSION_REGISTRY_H_ */

@ -28,7 +28,7 @@
#include "upb/internal/atoi.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val) {
uint64_t u64 = 0;

@ -29,7 +29,7 @@
#define UPB_INTERNAL_ATOI_H_
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -48,6 +48,6 @@ const char* upb_BufToInt64(const char* ptr, const char* end, int64_t* val,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_INTERNAL_ATOI_H_ */

@ -36,7 +36,7 @@
#include <string.h>
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#define UPB_MAXARRSIZE 16 /* 64k. */

@ -52,7 +52,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -379,6 +379,6 @@ uint32_t _upb_Hash(const void* p, size_t n, uint64_t seed);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_INTERNAL_TABLE_H_ */

@ -28,7 +28,7 @@
#include "upb/internal/unicode.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
int upb_Unicode_ToUTF8(uint32_t cp, char* out) {
if (cp <= 0x7f) {

@ -29,7 +29,7 @@
#define UPB_INTERNAL_UNICODE_H_
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -72,6 +72,6 @@ int upb_Unicode_ToUTF8(uint32_t cp, char* out);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_INTERNAL_UNICODE_H_ */

@ -28,7 +28,7 @@
#include "upb/io/chunked_input_stream.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct {
upb_ZeroCopyInputStream base;

@ -32,7 +32,7 @@
#include "upb/mem/arena.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -48,6 +48,6 @@ upb_ZeroCopyInputStream* upb_ChunkedInputStream_New(const void* data,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_CHUNKED_INPUT_STREAM_H_ */

@ -28,7 +28,7 @@
#include "upb/io/chunked_output_stream.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct {
upb_ZeroCopyOutputStream base;

@ -32,7 +32,7 @@
#include "upb/mem/arena.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -48,6 +48,6 @@ upb_ZeroCopyOutputStream* upb_ChunkedOutputStream_New(void* data, size_t size,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_CHUNKED_OUTPUT_STREAM_H_ */

@ -39,7 +39,7 @@
#include "upb/mem/arena.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -130,6 +130,6 @@ UPB_INLINE bool upb_String_PushBack(upb_String* s, char ch) {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_STRING_H_ */

@ -27,12 +27,11 @@
#include "upb/io/strtod.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Determine the locale-specific radix character by calling sprintf() to print
// the number 1.5, then stripping off the digits. As far as I can tell, this

@ -29,7 +29,7 @@
#define UPB_IO_STRTOD_H_
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -41,6 +41,6 @@ double NoLocaleStrtod(const char *str, char **endptr);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_STRTOD_H_ */

@ -27,14 +27,12 @@
#include "upb/io/tokenizer.h"
#include <stdio.h>
#include "upb/internal/unicode.h"
#include "upb/io/string.h"
#include "upb/io/strtod.h"
// Must be included last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef enum {
// Started a line comment.

@ -35,7 +35,7 @@
#include "upb/upb.h"
// Must be included last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -147,6 +147,6 @@ upb_StringView upb_Parse_String(const char* text, upb_Arena* arena);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif // UPB_IO_TOKENIZER_H_

@ -36,7 +36,7 @@
#include "upb/upb.hpp"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
namespace proto2 {
namespace io {

@ -31,7 +31,7 @@
#include "upb/status.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -124,6 +124,6 @@ upb_ZeroCopyInputStream_ByteCount(const upb_ZeroCopyInputStream* z) {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_ZERO_COPY_INPUT_STREAM_H_ */

@ -31,7 +31,7 @@
#include "upb/status.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -125,6 +125,6 @@ upb_ZeroCopyOutputStream_ByteCount(const upb_ZeroCopyOutputStream* z) {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_IO_ZERO_COPY_OUTPUT_STREAM_H_ */

@ -42,7 +42,7 @@
#include "upb/wire/encode.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct {
const char *ptr, *end;

@ -31,7 +31,7 @@
#include "upb/reflection/def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -47,6 +47,6 @@ bool upb_JsonDecode(const char* buf, size_t size, upb_Message* msg,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_JSONDECODE_H_ */

@ -32,17 +32,16 @@
#include <inttypes.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "upb/collections/map.h"
#include "upb/internal/vsnprintf_compat.h"
#include "upb/port/vsnprintf_compat.h"
#include "upb/reflection/message.h"
#include "upb/wire/decode.h"
#include "upb/wire/encode_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct {
char *buf, *ptr, *end;

@ -31,7 +31,7 @@
#include "upb/reflection/def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -65,6 +65,6 @@ size_t upb_JsonEncode(const upb_Message* msg, const upb_MessageDef* m,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_JSONENCODE_H_ */

@ -30,7 +30,7 @@
#include <stdlib.h>
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static void* upb_global_allocfunc(upb_alloc* alloc, void* ptr, size_t oldsize,
size_t size) {

@ -29,7 +29,7 @@
#define UPB_MEM_ALLOC_H_
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -93,6 +93,6 @@ UPB_INLINE void upb_gfree(void* ptr) { upb_free(&upb_alloc_global, ptr); }
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MEM_ALLOC_H_ */

@ -28,7 +28,7 @@
#include "upb/mem/arena_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static uint32_t* upb_cleanup_pointer(uintptr_t cleanup_metadata) {
return (uint32_t*)(cleanup_metadata & ~0x1);

@ -33,7 +33,7 @@
#include "upb/mem/alloc.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -163,6 +163,6 @@ UPB_INLINE upb_Arena* upb_Arena_New(void) {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MEM_ARENA_H_ */

@ -31,7 +31,7 @@
#include "upb/mem/arena.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -65,6 +65,6 @@ struct upb_Arena {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MEM_ARENA_INTERNAL_H_ */

@ -33,7 +33,7 @@
// Must be last.
#include "upb/msg.h"
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static size_t _upb_MiniTable_Field_GetSize(const upb_MiniTable_Field* f) {
static unsigned char sizes[] = {

@ -32,7 +32,7 @@
#include "upb/mini_table/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -331,6 +331,6 @@ upb_UnknownToMessage_Status upb_MiniTable_PromoteUnknownToMessageArray(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif // UPB_MINI_TABLE_ACCESSORS_H_

@ -34,7 +34,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
const char _kUpb_ToBase92[] = {
' ', '!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/',

@ -31,7 +31,7 @@
#include "upb/msg_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef enum {
kUpb_FieldModifier_IsRepeated = 1 << 0,
@ -70,6 +70,6 @@ UPB_INLINE const upb_MiniTable_Enum* upb_MiniTable_GetSubEnumTable(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_COMMON_H_ */

@ -31,7 +31,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef enum {
kUpb_EncodedType_Double = 0,
@ -118,6 +118,6 @@ UPB_INLINE bool _upb_FieldType_IsPackable(upb_FieldType type) {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_COMMON_INTERNAL_H_ */

@ -35,7 +35,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Note: we sort by this number when calculating layout order.
typedef enum {

@ -31,7 +31,7 @@
#include "upb/mini_table/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef enum {
kUpb_MiniTablePlatform_32Bit,
@ -92,6 +92,6 @@ upb_MiniTable* upb_MiniTable_BuildWithBuf(const char* data, size_t len,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_DECODE_H_ */

@ -34,7 +34,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
typedef struct {
uint64_t present_values_mask;

@ -31,7 +31,7 @@
#include "upb/mini_table/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// If the input buffer has at least this many bytes available, the encoder call
// is guaranteed to succeed (as long as field number order is maintained).
@ -104,6 +104,6 @@ char* upb_MtDataEncoder_EncodeMessageSet(upb_MtDataEncoder* e, char* ptr);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_ENCODE_INTERNAL_H_ */

@ -32,7 +32,7 @@
#include "upb/msg_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
const float kUpb_FltInfinity = INFINITY;
const double kUpb_Infinity = INFINITY;

@ -39,7 +39,7 @@
#include "upb/mem/arena.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -72,6 +72,6 @@ size_t upb_Message_ExtensionCount(const upb_Message* msg);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MSG_INT_H_ */

@ -45,7 +45,7 @@
#include "upb/upb.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -435,6 +435,6 @@ typedef struct {
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_MSG_INT_H_ */

@ -26,10 +26,9 @@
*/
/*
* This is where we define macros used across upb.
* This is where we define internal portability macros used across upb.
*
* All of these macros are undef'd in port_undef.inc to avoid leaking them to
* users.
* All of these macros are undef'd in undef.inc to avoid leaking them to users.
*
* The correct usage is:
*
@ -37,13 +36,13 @@
* #include "upb/baz.h"
*
* // MUST be last included header.
* #include "upb/port_def.inc"
* #include "upb/port/def.inc"
*
* // Code for this file.
* // <...>
*
* // Can be omitted for .c files, required for .h.
* #include "upb/port_undef.inc"
* #include "upb/port/undef.inc"
*
* This file is private and must not be included by users!
*/
@ -68,6 +67,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#if UINTPTR_MAX == 0xffffffff
#define UPB_SIZE(size32, size64) size32

@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* See port_def.inc. This should #undef all macros #defined there. */
// This should #undef all macros #defined in def.inc
#undef UPB_SIZE
#undef UPB_PTR_AT

@ -25,13 +25,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef UPB_INTERNAL_VSNPRINTF_COMPAT_H_
#define UPB_INTERNAL_VSNPRINTF_COMPAT_H_
#include <stdio.h>
#ifndef UPB_PORT_VSNPRINTF_COMPAT_H_
#define UPB_PORT_VSNPRINTF_COMPAT_H_
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
UPB_INLINE int _upb_vsnprintf(char* buf, size_t size, const char* fmt,
va_list ap) {
@ -47,6 +45,6 @@ UPB_INLINE int _upb_vsnprintf(char* buf, size_t size, const char* fmt,
#endif
}
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif // UPB_INTERNAL_VSNPRINTF_COMPAT_H_
#endif // UPB_PORT_VSNPRINTF_COMPAT_H_

@ -33,7 +33,7 @@
#include "upb/reflection/field_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
/* The upb core does not generally have a concept of default instances. However
* for descriptor options we make an exception since the max size is known and

@ -33,7 +33,7 @@
#include "upb/reflection/def_type.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// We want to copy the options verbatim into the destination options proto.
// We use serialize+parse as our deep copy.
@ -168,6 +168,6 @@ UPB_INLINE void _upb_DefBuilder_CheckIdentFull(upb_DefBuilder* ctx,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ */

@ -30,7 +30,7 @@
#include "upb/reflection/def_builder_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct IdentTest {
const char* text;

@ -36,7 +36,7 @@
#include "upb/reflection/service_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_DefPool {
upb_Arena* arena;
@ -339,9 +339,6 @@ const upb_FileDef* upb_DefPool_AddFile(
return _upb_DefPool_AddFile(s, file_proto, NULL, status);
}
/* Include here since we want most of this file to be stdio-free. */
#include <stdio.h>
bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init,
bool rebuild_minitable) {
/* Since this function should never fail (it would indicate a bug in upb) we

@ -35,7 +35,7 @@
#include "upb/string_view.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -101,6 +101,6 @@ const upb_FieldDef** upb_DefPool_GetAllExtensions(const upb_DefPool* s,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_POOL_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/def_pool.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -70,6 +70,6 @@ bool _upb_DefPool_LoadDefInitEx(upb_DefPool* s, const _upb_DefPool_Init* init,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_POOL_INTERNAL_H_ */

@ -28,7 +28,7 @@
#include "upb/reflection/def_type.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
upb_deftype_t _upb_DefType_Type(upb_value v) {
const uintptr_t num = (uintptr_t)upb_value_getconstptr(v);

@ -31,7 +31,7 @@
#include "upb/internal/table.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Inside a symtab we store tagged pointers to specific def types.
typedef enum {
@ -76,6 +76,6 @@ const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_TYPE_H_ */

@ -28,7 +28,7 @@
#include "upb/reflection/desc_state_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) {
const size_t oldbufsize = d->bufsize;

@ -31,7 +31,7 @@
#include "upb/mini_table/encode_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Manages the storage for mini descriptor strings as they are being encoded.
// TODO(b/234740652): Move some of this state directly into the encoder, maybe.
@ -58,6 +58,6 @@ bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */

@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include "upb/mini_table/decode.h"
#include "upb/reflection/def_builder_internal.h"
#include "upb/reflection/def_type.h"
@ -37,7 +35,7 @@
#include "upb/reflection/message_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_EnumDef {
const google_protobuf_EnumOptions* opts;

@ -34,7 +34,7 @@
#include "upb/string_view.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -67,6 +67,6 @@ int upb_EnumDef_ValueCount(const upb_EnumDef* e);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/enum_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -50,6 +50,6 @@ upb_EnumDef* _upb_EnumDefs_New(upb_DefBuilder* ctx, int n,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */

@ -32,7 +32,7 @@
#include "upb/reflection/file_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_EnumValueDef {
const google_protobuf_EnumValueOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -52,6 +52,6 @@ const google_protobuf_EnumValueOptions* upb_EnumValueDef_Options(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/enum_value_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -52,6 +52,6 @@ const upb_EnumValueDef** _upb_EnumValueDefs_Sorted(const upb_EnumValueDef* v,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/message_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_ExtensionRange {
const google_protobuf_ExtensionRangeOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -50,6 +50,6 @@ const google_protobuf_ExtensionRangeOptions* upb_ExtensionRange_Options(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_EXTENSION_RANGE_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/extension_range.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -49,6 +49,6 @@ upb_ExtensionRange* _upb_ExtensionRanges_New(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ */

@ -42,7 +42,7 @@
#include "upb/reflection/oneof_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#define UPB_FIELD_TYPE_UNSPECIFIED 0

@ -34,7 +34,7 @@
#include "upb/string_view.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Maximum field number allowed for FieldDefs.
// This is an inherent limit of the protobuf wire format.
@ -85,6 +85,6 @@ upb_FieldType upb_FieldDef_Type(const upb_FieldDef* f);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_FIELD_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/field_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -63,6 +63,6 @@ const upb_FieldDef** _upb_FieldDefs_Sorted(const upb_FieldDef* f, int n,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ */

@ -34,7 +34,7 @@
#include "upb/reflection/service_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_FileDef {
const google_protobuf_FileOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -71,6 +71,6 @@ int upb_FileDef_WeakDependencyCount(const upb_FileDef* f);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_FILE_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/file_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -52,6 +52,6 @@ void _upb_FileDef_Create(upb_DefBuilder* ctx,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_FILE_DEF_INTERNAL_H_ */

@ -39,7 +39,7 @@
#include "upb/reflection/oneof_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
static size_t get_field_size(const upb_MiniTable_Field* f) {
static unsigned char sizes[] = {

@ -32,7 +32,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -98,6 +98,6 @@ bool upb_Message_DiscardUnknown(upb_Message* msg, const upb_MessageDef* m,
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_H_ */

@ -37,7 +37,7 @@
#include "upb/reflection/oneof_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_MessageDef {
const google_protobuf_MessageOptions* opts;

@ -34,7 +34,7 @@
#include "upb/string_view.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
// Well-known field tag numbers for map-entry messages.
#define kUpb_MapEntry_KeyFieldNumber 1
@ -159,6 +159,6 @@ upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/message_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -57,6 +57,6 @@ upb_MessageDef* _upb_MessageDefs_New(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/service_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_MethodDef {
const google_protobuf_MethodOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -54,6 +54,6 @@ const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_METHOD_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/method_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -48,6 +48,6 @@ upb_MethodDef* _upb_MethodDefs_New(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ */

@ -36,7 +36,7 @@
#include "upb/reflection/oneof_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_OneofDef {
const google_protobuf_OneofOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -61,6 +61,6 @@ const google_protobuf_OneofOptions* upb_OneofDef_Options(const upb_OneofDef* o);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ONEOF_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/oneof_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -52,6 +52,6 @@ size_t _upb_OneofDefs_Finalize(upb_DefBuilder* ctx, upb_MessageDef* m);
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ */

@ -32,7 +32,7 @@
#include "upb/reflection/service_def_internal.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
struct upb_ServiceDef {
const google_protobuf_ServiceOptions* opts;

@ -33,7 +33,7 @@
#include "upb/reflection/common.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -54,6 +54,6 @@ const google_protobuf_ServiceOptions* upb_ServiceDef_Options(const upb_ServiceDe
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_SERVICE_DEF_H_ */

@ -31,7 +31,7 @@
#include "upb/reflection/service_def.h"
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@ -48,6 +48,6 @@ upb_ServiceDef* _upb_ServiceDefs_New(
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#include "upb/port/undef.inc"
#endif /* UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ */

@ -30,12 +30,11 @@
#include <errno.h>
#include <float.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Must be last.
#include "upb/port_def.inc"
#include "upb/port/def.inc"
void upb_Status_Clear(upb_Status* status) {
if (!status) return;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save