aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/c_std/bits/std_csetjmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/c_std/bits/std_csetjmp.h')
-rw-r--r--libstdc++-v3/include/c_std/bits/std_csetjmp.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libstdc++-v3/include/c_std/bits/std_csetjmp.h b/libstdc++-v3/include/c_std/bits/std_csetjmp.h
index b8c319ce0a7..73648aeb8fd 100644
--- a/libstdc++-v3/include/c_std/bits/std_csetjmp.h
+++ b/libstdc++-v3/include/c_std/bits/std_csetjmp.h
@@ -31,21 +31,24 @@
// ISO C++ 14882: 20.4.6 C library
//
-// Note: This is not a conforming implementation.
-
#ifndef _CPP_CSETJMP
#define _CPP_CSETJMP 1
#pragma GCC system_header
-#include <setjmp.h>
+#include_next <setjmp.h>
// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
#undef longjmp
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef setjmp
+#define setjmp(env) setjmp (env)
+#endif
+
namespace std
{
using ::jmp_buf;
- extern "C" void longjmp(jmp_buf, int);
+ using ::longjmp;
}
#endif