@@ -35,6 +35,8 @@ pub type wchar_t = u16;
35
35
36
36
pub type clock_t = i32 ;
37
37
38
+ pub type _crt_signal_t = usize ;
39
+
38
40
cfg_if ! {
39
41
if #[ cfg( all( target_arch = "x86" , target_env = "gnu" ) ) ] {
40
42
pub type time_t = i32 ;
@@ -177,6 +179,14 @@ pub const ENOTEMPTY: ::c_int = 41;
177
179
pub const EILSEQ : :: c_int = 42 ;
178
180
pub const STRUNCATE : :: c_int = 80 ;
179
181
182
+ pub const SIGINT : :: c_int = 2 ;
183
+ pub const SIGILL : :: c_int = 4 ;
184
+ pub const SIGABRT : :: c_int = 22 ;
185
+ pub const SIGFPE : :: c_int = 8 ;
186
+ pub const SIGSEGV : :: c_int = 11 ;
187
+ pub const SIGTERM : :: c_int = 15 ;
188
+ pub const SIG_ERR : :: c_int = -1 ;
189
+
180
190
// inline comment below appeases style checker
181
191
#[ cfg( all( target_env = "msvc" , feature = "rustc-dep-of-std" ) ) ] // " if "
182
192
#[ link( name = "msvcrt" , cfg( not( target_feature = "crt-static" ) ) ) ]
@@ -286,6 +296,8 @@ extern {
286
296
pub fn labs ( i : c_long ) -> c_long ;
287
297
pub fn rand ( ) -> c_int ;
288
298
pub fn srand ( seed : c_uint ) ;
299
+ pub fn signal ( signum : c_int , handler : _crt_signal_t ) -> _crt_signal_t ;
300
+ pub fn raise ( signum : c_int ) -> c_int ;
289
301
290
302
#[ link_name = "_chmod" ]
291
303
pub fn chmod ( path : * const c_char , mode : :: c_int ) -> :: c_int ;
0 commit comments