about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/os/android/raw.rs105
1 files changed, 58 insertions, 47 deletions
diff --git a/library/std/src/os/android/raw.rs b/library/std/src/os/android/raw.rs
index a255d032086..daaf3d3eac6 100644
--- a/library/std/src/os/android/raw.rs
+++ b/library/std/src/os/android/raw.rs
@@ -21,26 +21,26 @@ pub use self::arch::{blkcnt_t, blksize_t, dev_t, ino_t, mode_t, nlink_t, off_t,
 
 #[cfg(any(target_arch = "arm", target_arch = "x86"))]
 mod arch {
-    use crate::os::raw::{c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong};
+    use crate::os::raw::{c_long, c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong};
     use crate::os::unix::raw::{gid_t, uid_t};
 
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type dev_t = u64;
+    pub type dev_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type mode_t = u32;
+    pub type mode_t = c_uint;
 
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blkcnt_t = u64;
+    pub type blkcnt_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blksize_t = u64;
+    pub type blksize_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type ino_t = u64;
+    pub type ino_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type nlink_t = u64;
+    pub type nlink_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type off_t = u64;
+    pub type off_t = i32;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type time_t = i64;
+    pub type time_t = c_long;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -70,18 +70,20 @@ mod arch {
         pub st_blksize: u32,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_blocks: c_ulonglong,
+
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_atime: c_ulong,
+        pub st_atime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_atime_nsec: c_ulong,
+        pub st_atime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_mtime: c_ulong,
+        pub st_mtime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_mtime_nsec: c_ulong,
+        pub st_mtime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ctime: c_ulong,
+        pub st_ctime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ctime_nsec: c_ulong,
+        pub st_ctime_nsec: c_long,
+
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_ino: c_ulonglong,
     }
@@ -89,26 +91,26 @@ mod arch {
 
 #[cfg(target_arch = "aarch64")]
 mod arch {
-    use crate::os::raw::{c_uchar, c_ulong};
+    use crate::os::raw::{c_int, c_long, c_uint, c_ulong};
     use crate::os::unix::raw::{gid_t, uid_t};
 
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub type dev_t = u64;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type mode_t = u32;
+    pub type mode_t = c_uint;
 
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blkcnt_t = u64;
+    pub type blkcnt_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blksize_t = u64;
+    pub type blksize_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type ino_t = u64;
+    pub type ino_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type nlink_t = u64;
+    pub type nlink_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type off_t = u64;
+    pub type off_t = i64;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type time_t = i64;
+    pub type time_t = c_long;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -117,9 +119,7 @@ mod arch {
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_dev: dev_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub __pad0: [c_uchar; 4],
-        #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub __st_ino: ino_t,
+        pub st_ino: ino_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_mode: mode_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
@@ -131,27 +131,33 @@ mod arch {
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_rdev: dev_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub __pad3: [c_uchar; 4],
+        pub __pad1: c_ulong,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_size: off_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_blksize: blksize_t,
+        pub st_blksize: c_int,
+        #[stable(feature = "raw_ext", since = "1.1.0")]
+        pub __pad2: c_int,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_blocks: blkcnt_t,
+        pub st_blocks: c_long,
+
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_atime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_atime_nsec: c_ulong,
+        pub st_atime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_mtime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_mtime_nsec: c_ulong,
+        pub st_mtime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_ctime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ctime_nsec: c_ulong,
+        pub st_ctime_nsec: c_long,
+
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ino: ino_t,
+        pub __unused4: c_uint,
+        #[stable(feature = "raw_ext", since = "1.1.0")]
+        pub __unused5: c_uint,
     }
 }
 
@@ -163,20 +169,20 @@ mod arch {
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub type dev_t = u64;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type mode_t = u32;
+    pub type mode_t = c_uint;
 
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blkcnt_t = u64;
+    pub type blkcnt_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type blksize_t = u64;
+    pub type blksize_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type ino_t = u64;
+    pub type ino_t = c_ulong;
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub type nlink_t = u32;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type off_t = u64;
+    pub type off_t = i64;
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub type time_t = i64;
+    pub type time_t = c_long;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -195,25 +201,30 @@ mod arch {
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_gid: gid_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
+        pub __pad0: c_uint,
+        #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_rdev: dev_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_size: i64,
+        pub st_size: off_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_blksize: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_blocks: c_long,
+
+        #[stable(feature = "raw_ext", since = "1.1.0")]
+        pub st_atime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_atime: c_ulong,
+        pub st_atime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_atime_nsec: c_ulong,
+        pub st_mtime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_mtime: c_ulong,
+        pub st_mtime_nsec: c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_mtime_nsec: c_ulong,
+        pub st_ctime: time_t,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ctime: c_ulong,
+        pub st_ctime_nsec: c_long,
+
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub st_ctime_nsec: c_ulong,
-        __unused: [c_long; 3],
+        pub __pad3: [c_long; 3],
     }
 }