xref: /rust-libc-0.2.174/src/windows/gnu/mod.rs (revision ef39104f)
1 cfg_if! {
2     if #[cfg(target_pointer_width = "64")] {
3         s_no_extra_traits! {
4             #[allow(missing_debug_implementations)]
5             #[repr(align(16))]
6             pub struct max_align_t {
7                 priv_: [f64; 4],
8             }
9         }
10     } else if #[cfg(target_pointer_width = "32")] {
11         s_no_extra_traits! {
12             #[allow(missing_debug_implementations)]
13             #[repr(align(16))]
14             pub struct max_align_t {
15                 priv_: [i64; 6],
16             }
17         }
18     }
19 }
20 
21 pub const L_tmpnam: ::c_uint = 14;
22 pub const TMP_MAX: ::c_uint = 0x7fff;
23 
24 // stdio file descriptor numbers
25 pub const STDIN_FILENO: ::c_int = 0;
26 pub const STDOUT_FILENO: ::c_int = 1;
27 pub const STDERR_FILENO: ::c_int = 2;
28 
29 extern "C" {
30     pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;
31     pub fn strncasecmp(s1: *const ::c_char, s2: *const ::c_char, n: ::size_t) -> ::c_int;
32 
33     // NOTE: For MSVC target, `wmemchr` is only a inline function in `<wchar.h>`
34     //      header file. We cannot find a way to link to that symbol from Rust.
35     pub fn wmemchr(cx: *const ::wchar_t, c: ::wchar_t, n: ::size_t) -> *mut ::wchar_t;
36 }
37