From 49be10a8179165d24bbb8eb3490c4ca6f94b42c4 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Fri, 1 Nov 2019 07:42:33 -0700 Subject: Update libc crate to 0.2.66 This change updates the libc crate to version 0.2.66. Import subrepo libc/:libc at 4f11029a68040c90acf771976b019c1ef273a8cd --- libc/src/windows/gnu/align.rs | 19 +++++++++++++++++++ libc/src/windows/gnu/mod.rs | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 libc/src/windows/gnu/align.rs create mode 100644 libc/src/windows/gnu/mod.rs (limited to 'libc/src/windows/gnu') diff --git a/libc/src/windows/gnu/align.rs b/libc/src/windows/gnu/align.rs new file mode 100644 index 0000000..3af99e3 --- /dev/null +++ b/libc/src/windows/gnu/align.rs @@ -0,0 +1,19 @@ +cfg_if! { + if #[cfg(target_pointer_width = "64")] { + s_no_extra_traits! { + #[allow(missing_debug_implementations)] + #[repr(align(16))] + pub struct max_align_t { + priv_: [f64; 4] + } + } + } else if #[cfg(target_pointer_width = "32")] { + s_no_extra_traits! { + #[allow(missing_debug_implementations)] + #[repr(align(16))] + pub struct max_align_t { + priv_: [i64; 6] + } + } + } +} diff --git a/libc/src/windows/gnu/mod.rs b/libc/src/windows/gnu/mod.rs new file mode 100644 index 0000000..e74628b --- /dev/null +++ b/libc/src/windows/gnu/mod.rs @@ -0,0 +1,23 @@ +pub const L_tmpnam: ::c_uint = 14; +pub const TMP_MAX: ::c_uint = 0x7fff; + +// stdio file descriptor numbers +pub const STDIN_FILENO: ::c_int = 0; +pub const STDOUT_FILENO: ::c_int = 1; +pub const STDERR_FILENO: ::c_int = 2; + +extern "C" { + pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int; + pub fn strncasecmp( + s1: *const ::c_char, + s2: *const ::c_char, + n: ::size_t, + ) -> ::c_int; +} + +cfg_if! { + if #[cfg(libc_align)] { + mod align; + pub use self::align::*; + } +} -- cgit v1.2.1