[libcxx-commits] [PATCH] D100336: [libc++] Provide c++03 alternative for va_copy if available in xlocale.h
Jason Liu via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 1 11:03:09 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa319eafd160d: [libc++] Provide c++03 alternative for va_copy if available in xlocale.h (authored by jasonliu).
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Changed prior to commit:
https://reviews.llvm.org/D100336?vs=337570&id=355954#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100336/new/
https://reviews.llvm.org/D100336
Files:
libcxx/include/__support/ibm/xlocale.h
Index: libcxx/include/__support/ibm/xlocale.h
===================================================================
--- libcxx/include/__support/ibm/xlocale.h
+++ libcxx/include/__support/ibm/xlocale.h
@@ -310,7 +310,12 @@
}
va_list ap_copy;
+ // va_copy may not be provided by the C library in C++ 03 mode.
+#if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
+ __builtin_va_copy(ap_copy, ap);
+#else
va_copy(ap_copy, ap);
+#endif
int str_size = vsnprintf(*strp, buff_size, fmt, ap_copy);
va_end(ap_copy);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100336.355954.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210701/dfa2e59a/attachment.bin>
More information about the libcxx-commits
mailing list