abseil-cpp/options-old.patch
Dominique Leuenberger 5aa5a67ae9 Accepting request 985793 from devel:microos
- Remove obsolete 0%{suse_version} < 1500 conditions

- Add options-old.patch, options-cxx17.patch
  * Ensure ABI stability regardless of compiler settings per instruction in the header.

OBS-URL: https://build.opensuse.org/request/show/985793
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/abseil-cpp?expand=0&rev=23
2022-06-30 11:18:08 +00:00

44 lines
1.4 KiB
Diff

Make the headers always tell the truth about the ABI of the compiled dll's
to avoid mysterious linker errors when using wrong C++ version in compiler.
This version of the patch is for old systems where the system compiler does not use C++17.
For more information, see “notice for package managers” in options.h
--- a/absl/base/options.h 2021-11-03 16:26:14.000000000 +0100
+++ b/absl/base/options.h 2022-06-28 22:49:52.830727200 +0200
@@ -100,7 +100,7 @@
// User code should not inspect this macro. To check in the preprocessor if
// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY.
-#define ABSL_OPTION_USE_STD_ANY 2
+#define ABSL_OPTION_USE_STD_ANY 0
// ABSL_OPTION_USE_STD_OPTIONAL
@@ -127,7 +127,7 @@
// absl::optional is a typedef of std::optional, use the feature macro
// ABSL_USES_STD_OPTIONAL.
-#define ABSL_OPTION_USE_STD_OPTIONAL 2
+#define ABSL_OPTION_USE_STD_OPTIONAL 0
// ABSL_OPTION_USE_STD_STRING_VIEW
@@ -154,7 +154,7 @@
// absl::string_view is a typedef of std::string_view, use the feature macro
// ABSL_USES_STD_STRING_VIEW.
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
+#define ABSL_OPTION_USE_STD_STRING_VIEW 0
// ABSL_OPTION_USE_STD_VARIANT
//
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE