File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
libc/include/llvm-libc-macros Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 99#ifndef LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
1010#define LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
1111
12+ #include "__llvm-libc-common.h"
13+
1214#define SIGINT 2
1315#define SIGILL 4
1416#define SIGABRT 6
1517#define SIGFPE 8
1618#define SIGSEGV 11
1719#define SIGTERM 15
1820
19- #define SIG_DFL ((void (*)(int))(0))
20- #define SIG_IGN ((void (*)(int))(1))
21- #define SIG_ERR ((void (*)(int))(-1))
21+ #define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), -1)
22+ #define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 0)
23+ #define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 1)
24+ #define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 2)
2225
2326// Max signal number
2427#define NSIG 64
Original file line number Diff line number Diff line change 99#ifndef LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
1010#define LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
1111
12+ #include "__llvm-libc-common.h"
13+
1214#define SIGHUP 1
1315#define SIGINT 2
1416#define SIGQUIT 3
8688#error "Signal stack sizes not defined for your platform."
8789#endif
8890
89- #define SIG_DFL ((void (*)(int))0)
90- #define SIG_IGN ((void (*)(int))1)
91- #define SIG_ERR ((void (*)(int))(-1))
91+ #define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), -1)
92+ #define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 0)
93+ #define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 1)
94+ #define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 2)
9295
9396// SIGCHLD si_codes
9497#define CLD_EXITED 1 // child has exited
You can’t perform that action at this time.
0 commit comments