summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2023-05-16 15:13:54 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 20:35:57 +0000
commitd2a24d73cb763b1564c8907bf293c467aabb5b6c (patch)
tree0e926ce7717864a2b4a2b8f56e06b562bf02780b /src/mongo/util
parente90dcb18de438b6b6ab02b2c921463fd35b866cb (diff)
downloadmongo-d2a24d73cb763b1564c8907bf293c467aabb5b6c.tar.gz
SERVER-77193 Centralize the macro definition of __has_feature into one place
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/future_test_utils.h4
-rw-r--r--src/mongo/util/quick_exit.cpp4
-rw-r--r--src/mongo/util/signal_handlers_synchronous_test.cpp4
-rw-r--r--src/mongo/util/stacktrace_posix.cpp4
4 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/util/future_test_utils.h b/src/mongo/util/future_test_utils.h
index 6608b254193..14101383463 100644
--- a/src/mongo/util/future_test_utils.h
+++ b/src/mongo/util/future_test_utils.h
@@ -36,10 +36,6 @@
#include "mongo/unittest/unittest.h"
#include "mongo/util/executor_test_util.h"
-#if !defined(__has_feature)
-#define __has_feature(x) 0
-#endif
-
/** Workaround for bug in MSVC 2022's lambda processor. See SERVER-62480. */
#ifdef _MSC_VER
#define FTU_LAMBDA_R(...) ->__VA_ARGS__
diff --git a/src/mongo/util/quick_exit.cpp b/src/mongo/util/quick_exit.cpp
index 0e89fcfcc3f..58f5b408397 100644
--- a/src/mongo/util/quick_exit.cpp
+++ b/src/mongo/util/quick_exit.cpp
@@ -45,10 +45,6 @@
// NOTE: Header only dependencies are OK in this library.
#include "mongo/stdx/mutex.h" // IWYU pragma: keep
-#if !defined(__has_feature)
-#define __has_feature(x) 0
-#endif
-
#if !defined(__has_include)
#define __has_include(x) 0
#endif
diff --git a/src/mongo/util/signal_handlers_synchronous_test.cpp b/src/mongo/util/signal_handlers_synchronous_test.cpp
index 39629adebbf..6a9f0929035 100644
--- a/src/mongo/util/signal_handlers_synchronous_test.cpp
+++ b/src/mongo/util/signal_handlers_synchronous_test.cpp
@@ -64,10 +64,6 @@ FATAL_SIGNAL(SIGQUIT)
FATAL_SIGNAL(SIGILL)
FATAL_SIGNAL(SIGABRT)
-#if not defined(__has_feature)
-#define __has_feature(X) 0
-#endif
-
#if !__has_feature(address_sanitizer)
// These signals trip the leak sanitizer
FATAL_SIGNAL(SIGSEGV)
diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
index 154f5f905c5..293df356747 100644
--- a/src/mongo/util/stacktrace_posix.cpp
+++ b/src/mongo/util/stacktrace_posix.cpp
@@ -57,10 +57,6 @@
#if defined(MONGO_CONFIG_USE_LIBUNWIND)
-#if !defined(__has_feature)
-#define __has_feature(x) 0
-#endif
-
#if __has_feature(thread_sanitizer)
// TODO: SERVER-48622 (and see also https://github.com/google/sanitizers/issues/943)
#error "Cannot currently use libunwind with -fsanitize=thread"