summaryrefslogtreecommitdiff
path: root/vendor/libc/src/windows/gnu
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
committerValentin Popov <valentin@popov.link>2024-01-08 00:21:28 +0300
commit1b6a04ca5504955c571d1c97504fb45ea0befee4 (patch)
tree7579f518b23313e8a9748a88ab6173d5e030b227 /vendor/libc/src/windows/gnu
parent5ecd8cf2cba827454317368b68571df0d13d7842 (diff)
downloadfparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.tar.xz
fparkan-1b6a04ca5504955c571d1c97504fb45ea0befee4.zip
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
Diffstat (limited to 'vendor/libc/src/windows/gnu')
-rw-r--r--vendor/libc/src/windows/gnu/align.rs19
-rw-r--r--vendor/libc/src/windows/gnu/mod.rs23
2 files changed, 42 insertions, 0 deletions
diff --git a/vendor/libc/src/windows/gnu/align.rs b/vendor/libc/src/windows/gnu/align.rs
new file mode 100644
index 0000000..3af99e3
--- /dev/null
+++ b/vendor/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/vendor/libc/src/windows/gnu/mod.rs b/vendor/libc/src/windows/gnu/mod.rs
new file mode 100644
index 0000000..3e7d38b
--- /dev/null
+++ b/vendor/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;
+
+ // NOTE: For MSVC target, `wmemchr` is only a inline function in `<wchar.h>`
+ // header file. We cannot find a way to link to that symbol from Rust.
+ pub fn wmemchr(cx: *const ::wchar_t, c: ::wchar_t, n: ::size_t) -> *mut ::wchar_t;
+}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ }
+}