]> git.lizzy.rs Git - rust.git/blobdiff - src/liblibc/lib.rs
Auto merge of #21959 - dhuseby:bitrig-support, r=brson
[rust.git] / src / liblibc / lib.rs
index 887ab548f40334dfcad0c854d364e0f7ab86a1a3..bf0cc9b4ad5e1f24ad160c4d83d933aa343f79ff 100644 (file)
@@ -1949,7 +1949,7 @@ pub mod extra {
                     pub iSecurityScheme: c_int,
                     pub dwMessageSize: DWORD,
                     pub dwProviderReserved: DWORD,
-                    pub szProtocol: [u8; WSAPROTOCOL_LEN as usize + 1us],
+                    pub szProtocol: [u8; WSAPROTOCOL_LEN as usize + 1],
                 }
 
                 pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO;
@@ -2024,7 +2024,7 @@ pub mod bsd44 {
                 use types::common::c95::{c_void};
                 use types::os::arch::c95::{c_char, c_int, c_uint};
 
-                pub type socklen_t = c_int;
+                pub type socklen_t = u32;
                 pub type sa_family_t = u8;
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
@@ -2133,8 +2133,8 @@ pub mod c95 {
                 pub type c_double = f64;
                 pub type size_t = u32;
                 pub type ptrdiff_t = i32;
-                pub type clock_t = u32;
-                pub type time_t = i32;
+                pub type clock_t = c_ulong;
+                pub type time_t = c_long;
                 pub type suseconds_t = i32;
                 pub type wchar_t = i32;
             }
@@ -2147,6 +2147,8 @@ pub mod c99 {
                 pub type uintmax_t = u64;
             }
             pub mod posix88 {
+                use types::os::arch::c95::c_long;
+
                 pub type off_t = i64;
                 pub type dev_t = i32;
                 pub type ino_t = u64;
@@ -2155,7 +2157,7 @@ pub mod posix88 {
                 pub type gid_t = u32;
                 pub type useconds_t = u32;
                 pub type mode_t = u16;
-                pub type ssize_t = i32;
+                pub type ssize_t = c_long;
             }
             pub mod posix01 {
                 use types::common::c99::{int32_t, int64_t, uint32_t};
@@ -2164,8 +2166,8 @@ pub mod posix01 {
                                                      mode_t, off_t, uid_t};
 
                 pub type nlink_t = u16;
-                pub type blksize_t = i64;
-                pub type blkcnt_t = i32;
+                pub type blksize_t = i32;
+                pub type blkcnt_t = i64;
 
                 #[repr(C)]
                 #[derive(Copy)] pub struct stat {
@@ -2236,8 +2238,8 @@ pub mod c95 {
                 pub type c_double = f64;
                 pub type size_t = u64;
                 pub type ptrdiff_t = i64;
-                pub type clock_t = u64;
-                pub type time_t = i64;
+                pub type clock_t = c_ulong;
+                pub type time_t = c_long;
                 pub type suseconds_t = i32;
                 pub type wchar_t = i32;
             }
@@ -2250,6 +2252,8 @@ pub mod c99 {
                 pub type uintmax_t = u64;
             }
             pub mod posix88 {
+                use types::os::arch::c95::c_long;
+
                 pub type off_t = i64;
                 pub type dev_t = i32;
                 pub type ino_t = u64;
@@ -2258,7 +2262,7 @@ pub mod posix88 {
                 pub type gid_t = u32;
                 pub type useconds_t = u32;
                 pub type mode_t = u16;
-                pub type ssize_t = i64;
+                pub type ssize_t = c_long;
             }
             pub mod posix01 {
                 use types::common::c99::{int32_t, int64_t};
@@ -2268,8 +2272,8 @@ pub mod posix01 {
                 use types::os::arch::posix88::{mode_t, off_t, uid_t};
 
                 pub type nlink_t = u16;
-                pub type blksize_t = i64;
-                pub type blkcnt_t = i32;
+                pub type blksize_t = i32;
+                pub type blkcnt_t = i64;
 
                 #[repr(C)]
                 #[derive(Copy)] pub struct stat {
@@ -2476,6 +2480,7 @@ pub mod bsd44 {
             pub const SHUT_RDWR: c_int = 2;
         }
         pub mod extra {
+            use SOCKET;
             use types::os::arch::c95::{c_int, c_long};
             use types::os::arch::extra::{WORD, DWORD, BOOL, HANDLE};
 
@@ -2682,7 +2687,7 @@ pub mod extra {
 
             pub const MAX_PROTOCOL_CHAIN: DWORD = 7;
             pub const WSAPROTOCOL_LEN: DWORD = 255;
-            pub const INVALID_SOCKET: DWORD = !0;
+            pub const INVALID_SOCKET: SOCKET = !0;
 
             pub const DETACHED_PROCESS: DWORD = 0x00000008;
             pub const CREATE_NEW_PROCESS_GROUP: DWORD = 0x00000200;
@@ -5479,6 +5484,7 @@ pub mod bsd44 {
         use types::os::arch::c95::{c_uchar, c_int, size_t};
 
         extern {
+            #[cfg(not(all(target_os = "android", target_arch = "aarch64")))]
             pub fn getdtablesize() -> c_int;
             pub fn ioctl(d: c_int, request: c_int, ...) -> c_int;
             pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int)
@@ -5740,10 +5746,3 @@ pub mod winsock {
 pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen correctly
 
 #[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows
-
-// NOTE: remove after next snapshot
-#[doc(hidden)]
-#[cfg(all(stage0, not(test)))]
-mod std {
-    pub use core::marker;
-}