xref: /rust-libc-0.2.174/libc-test/test/sigrt.rs (revision 76b35d38)
1 //! Compare libc's SIGRTMAX and SIGRTMIN functions against the actual C macros
2 
3 #[cfg(any(
4     target_os = "linux",
5     target_os = "l4re",
6     target_os = "android",
7     target_os = "emscripten",
8     target_os = "solaris",
9     target_os = "illumos",
10 ))]
11 mod t {
12     use libc;
13 
14     extern "C" {
sigrtmax() -> libc::c_int15         pub fn sigrtmax() -> libc::c_int;
sigrtmin() -> libc::c_int16         pub fn sigrtmin() -> libc::c_int;
17     }
18 
19     #[test]
test_sigrtmax()20     fn test_sigrtmax() {
21         unsafe {
22             assert_eq!(libc::SIGRTMAX(), sigrtmax());
23         }
24     }
25 
26     #[test]
test_sigrtmin()27     fn test_sigrtmin() {
28         unsafe {
29             assert_eq!(libc::SIGRTMIN(), sigrtmin());
30         }
31     }
32 }
33