xref: /freebsd/contrib/llvm-project/libcxx/include/__new/new_handler.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1*700637cbSDimitry Andric //===----------------------------------------------------------------------===//
2*700637cbSDimitry Andric //
3*700637cbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*700637cbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*700637cbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*700637cbSDimitry Andric //
7*700637cbSDimitry Andric //===----------------------------------------------------------------------===//
8*700637cbSDimitry Andric 
9*700637cbSDimitry Andric #ifndef _LIBCPP___NEW_NEW_HANDLER_H
10*700637cbSDimitry Andric #define _LIBCPP___NEW_NEW_HANDLER_H
11*700637cbSDimitry Andric 
12*700637cbSDimitry Andric #include <__config>
13*700637cbSDimitry Andric 
14*700637cbSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15*700637cbSDimitry Andric #  pragma GCC system_header
16*700637cbSDimitry Andric #endif
17*700637cbSDimitry Andric 
18*700637cbSDimitry Andric #if defined(_LIBCPP_ABI_VCRUNTIME)
19*700637cbSDimitry Andric #  include <new.h>
20*700637cbSDimitry Andric #else
21*700637cbSDimitry Andric _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
22*700637cbSDimitry Andric typedef void (*new_handler)();
23*700637cbSDimitry Andric _LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
24*700637cbSDimitry Andric _LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
25*700637cbSDimitry Andric _LIBCPP_END_UNVERSIONED_NAMESPACE_STD
26*700637cbSDimitry Andric #endif // _LIBCPP_ABI_VCRUNTIME
27*700637cbSDimitry Andric 
28*700637cbSDimitry Andric #endif // _LIBCPP___NEW_NEW_HANDLER_H
29