1*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===// 2*0a6a1f1dSLionel Sambuc // 3*0a6a1f1dSLionel Sambuc // The LLVM Compiler Infrastructure 4*0a6a1f1dSLionel Sambuc // 5*0a6a1f1dSLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open 6*0a6a1f1dSLionel Sambuc // Source Licenses. See LICENSE.TXT for details. 7*0a6a1f1dSLionel Sambuc // 8*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===// 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc // test <csignal> 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc #include <csignal> 13*0a6a1f1dSLionel Sambuc #include <type_traits> 14*0a6a1f1dSLionel Sambuc 15*0a6a1f1dSLionel Sambuc #ifndef SIG_DFL 16*0a6a1f1dSLionel Sambuc #error SIG_DFL not defined 17*0a6a1f1dSLionel Sambuc #endif 18*0a6a1f1dSLionel Sambuc 19*0a6a1f1dSLionel Sambuc #ifndef SIG_ERR 20*0a6a1f1dSLionel Sambuc #error SIG_ERR not defined 21*0a6a1f1dSLionel Sambuc #endif 22*0a6a1f1dSLionel Sambuc 23*0a6a1f1dSLionel Sambuc #ifndef SIG_IGN 24*0a6a1f1dSLionel Sambuc #error SIG_IGN not defined 25*0a6a1f1dSLionel Sambuc #endif 26*0a6a1f1dSLionel Sambuc 27*0a6a1f1dSLionel Sambuc #ifndef SIGABRT 28*0a6a1f1dSLionel Sambuc #error SIGABRT not defined 29*0a6a1f1dSLionel Sambuc #endif 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambuc #ifndef SIGFPE 32*0a6a1f1dSLionel Sambuc #error SIGFPE not defined 33*0a6a1f1dSLionel Sambuc #endif 34*0a6a1f1dSLionel Sambuc 35*0a6a1f1dSLionel Sambuc #ifndef SIGILL 36*0a6a1f1dSLionel Sambuc #error SIGILL not defined 37*0a6a1f1dSLionel Sambuc #endif 38*0a6a1f1dSLionel Sambuc 39*0a6a1f1dSLionel Sambuc #ifndef SIGINT 40*0a6a1f1dSLionel Sambuc #error SIGINT not defined 41*0a6a1f1dSLionel Sambuc #endif 42*0a6a1f1dSLionel Sambuc 43*0a6a1f1dSLionel Sambuc #ifndef SIGSEGV 44*0a6a1f1dSLionel Sambuc #error SIGSEGV not defined 45*0a6a1f1dSLionel Sambuc #endif 46*0a6a1f1dSLionel Sambuc 47*0a6a1f1dSLionel Sambuc #ifndef SIGTERM 48*0a6a1f1dSLionel Sambuc #error SIGTERM not defined 49*0a6a1f1dSLionel Sambuc #endif 50*0a6a1f1dSLionel Sambuc main()51*0a6a1f1dSLionel Sambucint main() 52*0a6a1f1dSLionel Sambuc { 53*0a6a1f1dSLionel Sambuc std::sig_atomic_t sig = 0; 54*0a6a1f1dSLionel Sambuc ((void)sig); 55*0a6a1f1dSLionel Sambuc typedef void (*func)(int); 56*0a6a1f1dSLionel Sambuc static_assert((std::is_same<decltype(std::signal(0, (func)0)), func>::value), ""); 57*0a6a1f1dSLionel Sambuc static_assert((std::is_same<decltype(std::raise(0)), int>::value), ""); 58*0a6a1f1dSLionel Sambuc } 59