[libc] Add _Returns_twice to C++ code (#153602)

Fixes issue with `<csetjmp>` which requires `_Returns_twice` but in C++
mode
This commit is contained in:
William Huynh
2025-08-19 09:28:23 +01:00
committed by GitHub
parent da05208bfb
commit 0c622d72fc

View File

@@ -47,6 +47,13 @@
#define __NOEXCEPT throw()
#endif
#undef _Returns_twice
#if __cplusplus >= 201103L
#define _Returns_twice [[gnu::returns_twice]]
#else
#define _Returns_twice __attribute__((returns_twice))
#endif
// This macro serves as a generic cast implementation for use in both C and C++,
// similar to `__BIONIC_CAST` in Android.
#undef __LLVM_LIBC_CAST