summaryrefslogtreecommitdiff
path: root/absl/time/internal/cctz/src/time_zone_libc.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-11-13 08:47:54 -0800
committerGravatar Mark Barolak <mbar@google.com>2020-11-13 12:49:04 -0500
commit0bbebc85cd8dbd382b10698b3cefe9a01e88e76f (patch)
tree660c7345c1f31827946f855eeef1f4a8498c5086 /absl/time/internal/cctz/src/time_zone_libc.cc
parent0453e1653372fd719557aa70eaad34f691e0d5ae (diff)
Export of internal Abseil changes
-- a1b28d83d60f96e14487f093566f12ba07f92732 by Mark Barolak <mbar@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 342270204 -- 3d99c08b7e2ee23050f64965f09881b54821cdd0 by Mark Barolak <mbar@google.com>: Fix a Windows DLL breakage that is causing all sub-libraries to be compiled as DLL dependencies instead of stand-alone DLLs. See https://github.com/abseil/abseil-cpp/issues/796 for the bug report. Import of https://github.com/abseil/abseil-cpp/pull/797 PiperOrigin-RevId: 341892182 GitOrigin-RevId: a1b28d83d60f96e14487f093566f12ba07f92732 Change-Id: I7d70f07492bfa9b657ec280a4f005c1ee893594c
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_libc.cc')
-rw-r--r--absl/time/internal/cctz/src/time_zone_libc.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_libc.cc b/absl/time/internal/cctz/src/time_zone_libc.cc
index a14982a9..887dd097 100644
--- a/absl/time/internal/cctz/src/time_zone_libc.cc
+++ b/absl/time/internal/cctz/src/time_zone_libc.cc
@@ -27,6 +27,12 @@
#include "absl/time/internal/cctz/include/cctz/civil_time.h"
#include "absl/time/internal/cctz/include/cctz/time_zone.h"
+#if defined(_AIX)
+extern "C" {
+extern long altzone;
+}
+#endif
+
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace time_internal {
@@ -44,7 +50,7 @@ auto tm_zone(const std::tm& tm) -> decltype(_tzname[0]) {
const bool is_dst = tm.tm_isdst > 0;
return _tzname[is_dst];
}
-#elif defined(__sun)
+#elif defined(__sun) || defined(_AIX)
// Uses the globals: 'timezone', 'altzone' and 'tzname'.
auto tm_gmtoff(const std::tm& tm) -> decltype(timezone) {
const bool is_dst = tm.tm_isdst > 0;