blob: 81ca89091c1bcc5e9d8438304d6f5412c2d6991b [file] [log] [blame]
Howard Hinnantc51e1022010-05-11 19:42:16 +00001// -*- C++ -*-
Louis Dionne9bd93882021-11-17 16:25:01 -05002//===----------------------------------------------------------------------===//
Howard Hinnantc51e1022010-05-11 19:42:16 +00003//
Chandler Carruthd2012102019-01-19 10:56:40 +00004// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Howard Hinnantc51e1022010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP_CSIGNAL
11#define _LIBCPP_CSIGNAL
12
13/*
14 csignal synopsis
15
16Macros:
17
18 SIG_DFL
19 SIG_ERR
20 SIG_IGN
21 SIGABRT
22 SIGFPE
23 SIGILL
24 SIGINT
25 SIGSEGV
26 SIGTERM
Howard Hinnant3b6579a2010-08-22 00:02:43 +000027
Howard Hinnantc51e1022010-05-11 19:42:16 +000028namespace std
29{
30
31Types:
32
33 sig_atomic_t
34
35void (*signal(int sig, void (*func)(int)))(int);
36int raise(int sig);
37
38} // std
39
40*/
41
Louis Dionneb4fce352022-03-25 12:55:36 -040042#include <__assert> // all public C++ headers provide the assertion handler
Howard Hinnantc51e1022010-05-11 19:42:16 +000043#include <__config>
44#include <signal.h>
45
Howard Hinnantaaaa52b2011-10-17 20:05:10 +000046#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Arthur O'Dwyer6eeaa002022-02-01 20:16:40 -050047# pragma GCC system_header
Howard Hinnantaaaa52b2011-10-17 20:05:10 +000048#endif
Howard Hinnantc51e1022010-05-11 19:42:16 +000049
50_LIBCPP_BEGIN_NAMESPACE_STD
51
Louis Dionne9c660c62021-06-02 10:41:37 -040052using ::sig_atomic_t _LIBCPP_USING_IF_EXISTS;
53using ::signal _LIBCPP_USING_IF_EXISTS;
54using ::raise _LIBCPP_USING_IF_EXISTS;
Howard Hinnantc51e1022010-05-11 19:42:16 +000055
56_LIBCPP_END_NAMESPACE_STD
57
Louis Dionne2b1ceaa2021-04-20 12:03:32 -040058#endif // _LIBCPP_CSIGNAL