-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4afeb1b
commit 7ca20a7
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
recipe/patches/0001-ensure-we-re-using-the-right-abseil-macro.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
From 57c0a635066af900be819645d11cd477f7d183c1 Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <h.vetinari@gmx.com> | ||
Date: Sat, 4 Mar 2023 19:12:41 +1100 | ||
Subject: [PATCH] ensure we're using the right abseil macro | ||
|
||
see https://github.com/google/or-tools/issues/3698 | ||
--- | ||
ortools/base/logging.cc | 11 ++++++----- | ||
1 file changed, 6 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/ortools/base/logging.cc b/ortools/base/logging.cc | ||
index 1e1fd161a..16c15f854 100644 | ||
--- a/ortools/base/logging.cc | ||
+++ b/ortools/base/logging.cc | ||
@@ -46,6 +46,7 @@ | ||
#include <vector> | ||
|
||
#include "absl/debugging/stacktrace.h" | ||
+#include "absl/synchronization/mutex.h" | ||
#include "absl/time/time.h" | ||
#include "ortools/base/commandlineflags.h" | ||
#include "ortools/base/logging_utilities.h" | ||
@@ -1269,7 +1270,7 @@ void ReprintFatalMessage() { | ||
} | ||
|
||
// L >= log_mutex (callers must hold the log_mutex). | ||
-void LogMessage::SendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
+void LogMessage::SendToLog() ABSL_EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
static bool already_warned_before_initgoogle = false; | ||
|
||
log_mutex.AssertHeld(); | ||
@@ -1393,7 +1394,7 @@ void InstallFailureFunction(void (*fail_func)()) { | ||
void LogMessage::Fail() { g_logging_fail_func(); } | ||
|
||
// L >= log_mutex (callers must hold the log_mutex). | ||
-void LogMessage::SendToSink() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
+void LogMessage::SendToSink() ABSL_EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
if (data_->sink_ != nullptr) { | ||
RAW_DCHECK(data_->num_chars_to_log_ > 0 && | ||
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', | ||
@@ -1406,13 +1407,13 @@ void LogMessage::SendToSink() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
} | ||
|
||
// L >= log_mutex (callers must hold the log_mutex). | ||
-void LogMessage::SendToSinkAndLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
+void LogMessage::SendToSinkAndLog() ABSL_EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
SendToSink(); | ||
SendToLog(); | ||
} | ||
|
||
// L >= log_mutex (callers must hold the log_mutex). | ||
-void LogMessage::SaveOrSendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
+void LogMessage::SaveOrSendToLog() ABSL_EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
if (data_->outvec_ != nullptr) { | ||
RAW_DCHECK(data_->num_chars_to_log_ > 0 && | ||
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', | ||
@@ -1426,7 +1427,7 @@ void LogMessage::SaveOrSendToLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
} | ||
} | ||
|
||
-void LogMessage::WriteToStringAndLog() EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
+void LogMessage::WriteToStringAndLog() ABSL_EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { | ||
if (data_->message_ != nullptr) { | ||
RAW_DCHECK(data_->num_chars_to_log_ > 0 && | ||
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', | ||
-- | ||
2.38.1.windows.1 | ||
|