summaryrefslogtreecommitdiff
path: root/absl/time
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-07-25 12:32:02 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-07-25 12:33:44 -0700
commitac39cc1ec6fed8d3738b4df9589803c23d6d1e3a (patch)
tree546e961e9b7aae723c73278489f092d058498ee2 /absl/time
parentd74b1104a5e9a24964b34c30dcbfbc3bcca88576 (diff)
Import of CCTZ from GitHub.
PiperOrigin-RevId: 550964088 Change-Id: I54e4bff1cf72442c34e1668dbe8af9337eb0aa46
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/internal/cctz/BUILD.bazel9
-rw-r--r--absl/time/internal/cctz/src/time_zone_format.cc2
2 files changed, 6 insertions, 5 deletions
diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel
index edeabd81..4c5ad075 100644
--- a/absl/time/internal/cctz/BUILD.bazel
+++ b/absl/time/internal/cctz/BUILD.bazel
@@ -53,10 +53,11 @@ cc_library(
"include/cctz/time_zone.h",
"include/cctz/zone_info_source.h",
],
- # OS X and iOS no longer use `linkopts = ["-framework CoreFoundation"]`
- # as (1) bazel adds it automatically, and (2) it caused problems when
- # cross-compiling for Android.
- # See https://github.com/abseil/abseil-cpp/issues/326 for details.
+ linkopts = select({
+ "@platforms//os:osx": ["-Wl,-framework,CoreFoundation"],
+ "@platforms//os:ios": ["-Wl,-framework,CoreFoundation"],
+ "//conditions:default": [],
+ }),
visibility = ["//visibility:public"],
deps = [
":civil_time",
diff --git a/absl/time/internal/cctz/src/time_zone_format.cc b/absl/time/internal/cctz/src/time_zone_format.cc
index 96268a83..9b91f61c 100644
--- a/absl/time/internal/cctz/src/time_zone_format.cc
+++ b/absl/time/internal/cctz/src/time_zone_format.cc
@@ -20,7 +20,7 @@
#if defined(HAS_STRPTIME) && HAS_STRPTIME
#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__)
-#define _XOPEN_SOURCE // Definedness suffices for strptime().
+#define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98).
#endif
#endif