xref: /rust-libc-0.2.174/src/windows/gnu/mod.rs (revision 108310db)
1*108310dbSTrevor Gross use crate::prelude::*;
2643182f7SEduardo Sánchez Muñoz 
3b5b553d0STrevor Gross cfg_if! {
4b5b553d0STrevor Gross     if #[cfg(target_pointer_width = "64")] {
5b5b553d0STrevor Gross         s_no_extra_traits! {
6b5b553d0STrevor Gross             #[allow(missing_debug_implementations)]
7b5b553d0STrevor Gross             #[repr(align(16))]
8b5b553d0STrevor Gross             pub struct max_align_t {
950f26e08STrevor Gross                 priv_: [f64; 4],
10b5b553d0STrevor Gross             }
11b5b553d0STrevor Gross         }
12b5b553d0STrevor Gross     } else if #[cfg(target_pointer_width = "32")] {
13b5b553d0STrevor Gross         s_no_extra_traits! {
14b5b553d0STrevor Gross             #[allow(missing_debug_implementations)]
15b5b553d0STrevor Gross             #[repr(align(16))]
16b5b553d0STrevor Gross             pub struct max_align_t {
1750f26e08STrevor Gross                 priv_: [i64; 6],
18b5b553d0STrevor Gross             }
19b5b553d0STrevor Gross         }
20b5b553d0STrevor Gross     }
21b5b553d0STrevor Gross }
22b5b553d0STrevor Gross 
23643182f7SEduardo Sánchez Muñoz pub const L_tmpnam: c_uint = 14;
24643182f7SEduardo Sánchez Muñoz pub const TMP_MAX: c_uint = 0x7fff;
25974f550eSgnzlbg 
26974f550eSgnzlbg // stdio file descriptor numbers
27643182f7SEduardo Sánchez Muñoz pub const STDIN_FILENO: c_int = 0;
28643182f7SEduardo Sánchez Muñoz pub const STDOUT_FILENO: c_int = 1;
29643182f7SEduardo Sánchez Muñoz pub const STDERR_FILENO: c_int = 2;
30974f550eSgnzlbg 
31974f550eSgnzlbg extern "C" {
strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int32643182f7SEduardo Sánchez Muñoz     pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int;
strncasecmp(s1: *const c_char, s2: *const c_char, n: size_t) -> c_int33643182f7SEduardo Sánchez Muñoz     pub fn strncasecmp(s1: *const c_char, s2: *const c_char, n: size_t) -> c_int;
340327cc0bSLzu Tao 
350327cc0bSLzu Tao     // NOTE: For MSVC target, `wmemchr` is only a inline function in `<wchar.h>`
360327cc0bSLzu Tao     //      header file. We cannot find a way to link to that symbol from Rust.
wmemchr(cx: *const crate::wchar_t, c: crate::wchar_t, n: size_t) -> *mut crate::wchar_t37643182f7SEduardo Sánchez Muñoz     pub fn wmemchr(cx: *const crate::wchar_t, c: crate::wchar_t, n: size_t) -> *mut crate::wchar_t;
38974f550eSgnzlbg }
39