Skip to content

Commit 3b30f20

Browse files
committed
[libc++][TZDB] Fixes CI.
The commit 24e70e3 changed internal macros which were used in 0cd794d. This caused build failures on platforms without TZDB support
1 parent 83df39c commit 3b30f20

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

libcxx/include/__chrono/convert_to_tm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const chrono::sys_time<_Duration> __tp
100100
}
101101

102102
# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
103-
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
103+
# if _LIBCPP_HAS_EXPERIMENTAL_TZDB
104104

105105
template <class _Tm, class _Duration>
106106
_LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(chrono::utc_time<_Duration> __tp) {
@@ -112,7 +112,7 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(chrono::utc_time<_Duration> __tp) {
112112
return __result;
113113
}
114114

115-
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
115+
# endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB
116116
# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
117117

118118
// Convert a chrono (calendar) time point, or dururation to the given _Tm type,
@@ -128,10 +128,10 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoT& __value) {
128128
if constexpr (same_as<typename _ChronoT::clock, chrono::system_clock>)
129129
return std::__convert_to_tm<_Tm>(__value);
130130
# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
131-
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
131+
# if _LIBCPP_HAS_EXPERIMENTAL_TZDB
132132
else if constexpr (same_as<typename _ChronoT::clock, chrono::utc_clock>)
133133
return std::__convert_to_tm<_Tm>(__value);
134-
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
134+
# endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB
135135
# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
136136
else if constexpr (same_as<typename _ChronoT::clock, chrono::file_clock>)
137137
return std::__convert_to_tm<_Tm>(_ChronoT::clock::to_sys(__value));

libcxx/include/__chrono/formatter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::sys_time<_Duration>, _CharT> : pub
721721
};
722722

723723
# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
724-
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
724+
# if _LIBCPP_HAS_EXPERIMENTAL_TZDB
725725

726726
template <class _Duration, __fmt_char_type _CharT>
727727
struct _LIBCPP_TEMPLATE_VIS formatter<chrono::utc_time<_Duration>, _CharT> : public __formatter_chrono<_CharT> {
@@ -734,7 +734,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<chrono::utc_time<_Duration>, _CharT> : pub
734734
}
735735
};
736736

737-
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
737+
# endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB
738738
# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
739739

740740
template <class _Duration, __fmt_char_type _CharT>

libcxx/include/__chrono/ostream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const sys_days& __dp) {
6363
}
6464

6565
# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
66-
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
66+
# if _LIBCPP_HAS_EXPERIMENTAL_TZDB
6767

6868
template <class _CharT, class _Traits, class _Duration>
6969
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
7070
operator<<(basic_ostream<_CharT, _Traits>& __os, const utc_time<_Duration>& __tp) {
7171
return __os << std::format(__os.getloc(), _LIBCPP_STATICALLY_WIDEN(_CharT, "{:L%F %T}"), __tp);
7272
}
7373

74-
# endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
74+
# endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB
7575
# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
7676

7777
template <class _CharT, class _Traits, class _Duration>

libcxx/include/__chrono/utc_clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <version>
1414
// Enable the contents of the header only when libc++ was built with experimental features enabled.
15-
#if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
15+
#if _LIBCPP_HAS_EXPERIMENTAL_TZDB
1616

1717
# include <__chrono/duration.h>
1818
# include <__chrono/leap_second.h>
@@ -158,6 +158,6 @@ utc_clock::to_sys(const utc_time<_Duration>& __time) {
158158

159159
_LIBCPP_END_NAMESPACE_STD
160160

161-
#endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
161+
#endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB
162162

163163
#endif // _LIBCPP___CHRONO_UTC_CLOCK_H

0 commit comments

Comments
 (0)