1// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc. All rights reserved.
3// https://developers.google.com/protocol-buffers/
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// * Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11// * Redistributions in binary form must reproduce the above
12// copyright notice, this list of conditions and the following disclaimer
13// in the documentation and/or other materials provided with the
14// distribution.
15// * Neither the name of Google Inc. nor the names of its
16// contributors may be used to endorse or promote products derived from
17// this software without specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31// #undefs all macros defined in port_def.inc. See comments in port_def.inc
32// for more info.
33
34#ifndef PROTOBUF_NAMESPACE
35#error "port_undef.inc must be included after port_def.inc"
36#endif
37
38#undef PROTOBUF_BUILTIN_BSWAP16
39#undef PROTOBUF_BUILTIN_BSWAP32
40#undef PROTOBUF_BUILTIN_BSWAP64
41#undef PROTOBUF_GNUC_MIN
42#undef PROTOBUF_MSC_VER_MIN
43#undef PROTOBUF_CPLUSPLUS_MIN
44#undef PROTOBUF_NAMESPACE
45#undef PROTOBUF_NAMESPACE_ID
46#undef PROTOBUF_ALWAYS_INLINE
47#undef PROTOBUF_NDEBUG_INLINE
48#undef PROTOBUF_MUSTTAIL
49#undef PROTOBUF_TAILCALL
50#undef PROTOBUF_COLD
51#undef PROTOBUF_NOINLINE
52#undef PROTOBUF_SECTION_VARIABLE
53#undef PROTOBUF_DEPRECATED
54#undef PROTOBUF_DEPRECATED_ENUM
55#undef PROTOBUF_DEPRECATED_MSG
56#undef PROTOBUF_FUNC_ALIGN
57#undef PROTOBUF_RETURNS_NONNULL
58#undef PROTOBUF_ATTRIBUTE_REINITIALIZES
59#undef PROTOBUF_RTTI
60#undef PROTOBUF_VERSION
61#undef PROTOBUF_VERSION_SUFFIX
62#undef PROTOBUF_FIELD_OFFSET
63#undef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
64#undef PROTOBUF_MIN_PROTOC_VERSION
65#undef PROTOBUF_PREDICT_TRUE
66#undef PROTOBUF_PREDICT_FALSE
67#undef PROTOBUF_FALLTHROUGH_INTENDED
68#undef PROTOBUF_EXPORT
69#undef PROTOC_EXPORT
70#undef PROTOBUF_NODISCARD
71#undef PROTOBUF_FORCE_COPY_IN_RELEASE
72#undef PROTOBUF_FORCE_COPY_IN_SWAP
73#undef PROTOBUF_FORCE_COPY_IN_MOVE
74#undef PROTOBUF_FORCE_RESET_IN_CLEAR
75#undef PROTOBUF_FORCE_COPY_DEFAULT_STRING
76#undef PROTOBUF_NAMESPACE_OPEN
77#undef PROTOBUF_NAMESPACE_CLOSE
78#undef PROTOBUF_UNUSED
79#undef PROTOBUF_ASSUME
80#undef PROTOBUF_EXPORT_TEMPLATE_DECLARE
81#undef PROTOBUF_EXPORT_TEMPLATE_DEFINE
82#undef PROTOBUF_ALIGNAS
83#undef PROTOBUF_FINAL
84#undef PROTOBUF_FUTURE_FINAL
85#undef PROTOBUF_THREAD_LOCAL
86#undef PROTOBUF_LITTLE_ENDIAN
87#undef PROTOBUF_BIG_ENDIAN
88#undef PROTOBUF_MESSAGE_OWNED_ARENA_EXPERIMENT
89#undef PROTOBUF_CONSTINIT
90#undef PROTOBUF_CONSTEXPR
91#undef PROTOBUF_ATTRIBUTE_WEAK
92#undef PROTOBUF_HAVE_ATTRIBUTE_WEAK
93#undef PROTOBUF_ATTRIBUTE_NO_DESTROY
94#undef PROTOBUF_ATTRIBUTE_STANDALONE_DEBUG
95#undef PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
96#undef PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
97#undef PROTOBUF_PRAGMA_INIT_SEG
98#undef PROTOBUF_ASAN
99#undef PROTOBUF_MSAN
100#undef PROTOBUF_TSAN
101#undef PROTOBUF_TAIL_CALL_TABLE_PARSER_ENABLED
102#undef PROTOBUF_TC_PARAM_DECL
103#undef PROTOBUF_EXCLUSIVE_LOCKS_REQUIRED
104#undef PROTOBUF_LOCKS_EXCLUDED
105#undef PROTOBUF_NO_THREAD_SAFETY_ANALYSIS
106#undef PROTOBUF_GUARDED_BY
107
108#ifdef PROTOBUF_FUTURE_BREAKING_CHANGES
109#undef PROTOBUF_FUTURE_BREAKING_CHANGES
110#endif
111
112// Restore macro that may have been #undef'd in port_def.inc.
113#ifdef _MSC_VER
114#pragma pop_macro("CREATE_NEW")
115#pragma pop_macro("DELETE")
116#pragma pop_macro("DOUBLE_CLICK")
117#pragma pop_macro("ERROR")
118#pragma pop_macro("ERROR_BUSY")
119#pragma pop_macro("ERROR_INSTALL_FAILED")
120#pragma pop_macro("ERROR_NOT_FOUND")
121#pragma pop_macro("GetClassName")
122#pragma pop_macro("GetMessage")
123#pragma pop_macro("GetObject")
124#pragma pop_macro("IGNORE")
125#pragma pop_macro("IN")
126#pragma pop_macro("INPUT_KEYBOARD")
127#pragma pop_macro("OUT")
128#pragma pop_macro("OPTIONAL")
129#pragma pop_macro("min")
130#pragma pop_macro("max")
131#pragma pop_macro("NEAR")
132#pragma pop_macro("NO_DATA")
133#pragma pop_macro("NO_ERROR")
134#pragma pop_macro("REASON_UNKNOWN")
135#pragma pop_macro("SERVICE_DISABLED")
136#pragma pop_macro("SEVERITY_ERROR")
137#pragma pop_macro("STRICT")
138#pragma pop_macro("STATUS_PENDING")
139#pragma pop_macro("timezone")
140#endif
141
142#ifdef __APPLE__
143#pragma pop_macro("DOMAIN")
144#pragma pop_macro("TRUE")
145#pragma pop_macro("FALSE")
146#pragma pop_macro("UID_MAX")
147#endif // __APPLE__
148
149#if defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)
150#pragma pop_macro("DEBUG")
151#endif // defined(__clang__) || defined(__GNUC__) || defined(_MSC_VER)
152
153#if defined(__GNUC__)
154#pragma GCC diagnostic pop
155#endif
156
157// Pop the warning(push) from port_def.inc
158#ifdef _MSC_VER
159#pragma warning(pop)
160#endif
161