1 #ifndef R_SIGNAL_H
2 #define R_SIGNAL_H
3 
4 #if __UNIX__
5 #include <signal.h>
6 #endif
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /* Returns atoi(str) if signal with `str` name not found. */
13 R_API int r_signal_from_string (const char *str);
14 
15 /* Return NULL if signal with `code` not found. */
16 R_API const char* r_signal_to_string (int code);
17 
18 // XXX this function should be portable, not-unix specific
19 #if __UNIX__
20 R_API void r_signal_sigmask(int how, const sigset_t *newmask, sigset_t *oldmask);
21 #endif
22 
23 #ifdef __cplusplus
24 }
25 #endif
26 
27 #endif //  R_SIGNAL_H
28