Split <setjmp.h> out of <csetjmp>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@249743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4faa3944c6
commit
ddbf08114a
@ -38,10 +38,6 @@ void longjmp(jmp_buf env, int val);
|
|||||||
#pragma GCC system_header
|
#pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef setjmp
|
|
||||||
#define setjmp(env) setjmp(env)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||||
|
|
||||||
using ::jmp_buf;
|
using ::jmp_buf;
|
||||||
|
40
include/setjmp.h
Normal file
40
include/setjmp.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
//===--------------------------- setjmp.h ---------------------------------===//
|
||||||
|
//
|
||||||
|
// The LLVM Compiler Infrastructure
|
||||||
|
//
|
||||||
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||||
|
// Source Licenses. See LICENSE.TXT for details.
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#ifndef _LIBCPP_SETJMP_H
|
||||||
|
#define _LIBCPP_SETJMP_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
setjmp.h synopsis
|
||||||
|
|
||||||
|
Macros:
|
||||||
|
|
||||||
|
setjmp
|
||||||
|
|
||||||
|
Types:
|
||||||
|
|
||||||
|
jmp_buf
|
||||||
|
|
||||||
|
void longjmp(jmp_buf env, int val);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <__config>
|
||||||
|
#include_next <setjmp.h>
|
||||||
|
|
||||||
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||||
|
#pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef setjmp
|
||||||
|
#define setjmp(env) setjmp(env)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _LIBCPP_SETJMP_H
|
@ -12,6 +12,10 @@
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#ifndef setjmp
|
||||||
|
#error setjmp not defined
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
jmp_buf jb;
|
jmp_buf jb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user