aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/10-using_if_exists-in-clang11-and-msvcrt.patch
blob: b6f3270303a427de67f5ec02fe9119714fc72a30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/include/cstdlib b/include/cstdlib
index 1ecdd3a..02ee3a2 100644
--- a/include/cstdlib
+++ b/include/cstdlib
@@ -141,11 +141,11 @@ using ::wctomb _LIBCPP_USING_IF_EXISTS;
 using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
 using ::wcstombs _LIBCPP_USING_IF_EXISTS;
 #endif
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCPP_CXX03_LANG) && __has_attribute(using_if_exists)
 using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
 using ::quick_exit _LIBCPP_USING_IF_EXISTS;
 #endif
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 17 && __has_attribute(using_if_exists) && !defined(_LIBCPP_MSVCRT)
 using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
 #endif
 
diff --git a/include/ctime b/include/ctime
index d2d2470..2df861c 100644
--- a/include/ctime
+++ b/include/ctime
@@ -65,7 +65,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 using ::clock_t _LIBCPP_USING_IF_EXISTS;
 using ::time_t _LIBCPP_USING_IF_EXISTS;
 using ::tm _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 17 && __has_attribute(using_if_exists)
 using ::timespec _LIBCPP_USING_IF_EXISTS;
 #endif
 using ::clock _LIBCPP_USING_IF_EXISTS;
@@ -77,7 +77,7 @@ using ::ctime _LIBCPP_USING_IF_EXISTS;
 using ::gmtime _LIBCPP_USING_IF_EXISTS;
 using ::localtime _LIBCPP_USING_IF_EXISTS;
 using ::strftime _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 17 && __has_attribute(using_if_exists)
 using ::timespec_get _LIBCPP_USING_IF_EXISTS;
 #endif