Skip to content

Commit

Permalink
Fix broken max macro on Windows (#9273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerisa committed Dec 14, 2021
1 parent 29b3d01 commit 8c29dc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/google/protobuf/arena.h
Expand Up @@ -37,9 +37,6 @@
#include <limits>
#include <type_traits>
#include <utility>
#ifdef max
#undef max // Visual Studio defines this macro
#endif
#if defined(_MSC_VER) && !defined(_LIBCPP_STD_VER) && !_HAS_EXCEPTIONS
// Work around bugs in MSVC <typeinfo> header when _HAS_EXCEPTIONS=0.
#include <exception>
Expand Down
4 changes: 4 additions & 0 deletions src/google/protobuf/stubs/stl_util.h
Expand Up @@ -37,6 +37,8 @@

#include <algorithm>

#include <google/protobuf/port_def.inc>

namespace google {
namespace protobuf {

Expand Down Expand Up @@ -82,4 +84,6 @@ inline char* string_as_array(std::string* str) {
} // namespace protobuf
} // namespace google

#include <google/protobuf/port_undef.inc>

#endif // GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__

0 comments on commit 8c29dc2

Please sign in to comment.