brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · ace2eea Raw
55 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// test <signal.h>10 11#include <signal.h>12 13#include "test_macros.h"14 15#ifndef SIG_DFL16#error SIG_DFL not defined17#endif18 19#ifndef SIG_ERR20#error SIG_ERR not defined21#endif22 23#ifndef SIG_IGN24#error SIG_IGN not defined25#endif26 27#ifndef SIGABRT28#error SIGABRT not defined29#endif30 31#ifndef SIGFPE32#error SIGFPE not defined33#endif34 35#ifndef SIGILL36#error SIGILL not defined37#endif38 39#ifndef SIGINT40#error SIGINT not defined41#endif42 43#ifndef SIGSEGV44#error SIGSEGV not defined45#endif46 47#ifndef SIGTERM48#error SIGTERM not defined49#endif50 51sig_atomic_t sig;52typedef void (*func)(int);53ASSERT_SAME_TYPE(func, decltype(signal(0, (func)0)));54ASSERT_SAME_TYPE(int,  decltype(raise(0)));55