Skip to content

Commit

Permalink
[glog] Avoid including Windows.h (#24538)
Browse files Browse the repository at this point in the history
* Fix building errors of glog

* Bump the port version of glog

* Update version database

* Fix building errors

* Update version database
  • Loading branch information
whuaegeanse authored Jun 6, 2022
1 parent 904a51f commit fdeea72
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 62 deletions.
17 changes: 17 additions & 0 deletions ports/glog/fix-windows-CXX11_ATOMIC.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
index 3ecacfb..2d48a0e 100644
--- a/src/glog/logging.h.in
+++ b/src/glog/logging.h.in
@@ -100,6 +100,12 @@
#include <gflags/gflags.h>
#endif

+#ifdef GLOG_OS_WINDOWS
+#ifndef HAVE_CXX11_ATOMIC
+#define HAVE_CXX11_ATOMIC
+#endif
+#endif
+
#ifdef HAVE_CXX11_ATOMIC
#include <atomic>
#elif defined(GLOG_OS_WINDOWS)
59 changes: 0 additions & 59 deletions ports/glog/nogdi-nominmax.patch

This file was deleted.

2 changes: 1 addition & 1 deletion ports/glog/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vcpkg_from_github(
glog_disable_debug_postfix.patch
fix_glog_CMAKE_MODULE_PATH.patch
fix_log_every_n.patch
nogdi-nominmax.patch
fix-windows-CXX11_ATOMIC.patch
fix_crosscompile_symbolize.patch

)
Expand Down
2 changes: 1 addition & 1 deletion ports/glog/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "glog",
"version": "0.5.0",
"port-version": 3,
"port-version": 4,
"description": "C++ implementation of the Google logging module",
"homepage": "https://github.com/google/glog",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@
},
"glog": {
"baseline": "0.5.0",
"port-version": 3
"port-version": 4
},
"gloo": {
"baseline": "20201203",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/glog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bb5f54eba990cc0f03c64e1d09f343dd6cd7b22b",
"version": "0.5.0",
"port-version": 4
},
{
"git-tree": "ecb04a5ba4d046af782f62ae7c167bd05b0101a8",
"version": "0.5.0",
Expand Down

0 comments on commit fdeea72

Please sign in to comment.