about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAli Clark <ali@clark.gb.net>2016-02-17 16:55:43 +0000
committerAli Clark <ali@clark.gb.net>2016-02-17 16:55:43 +0000
commit3c534188f0875f5881cfa66c2daf64ec49d79af9 (patch)
tree3428b6cffa0c3ed87ac076e48c22dfa17db1468e
parentc99409f7932a21b0d465fab465302769f70a9686 (diff)
downloadrust-3c534188f0875f5881cfa66c2daf64ec49d79af9.tar.gz
rust-3c534188f0875f5881cfa66c2daf64ec49d79af9.zip
time_t is long on freebsd and dragonfly (and nsec should be long)
This becomes less relevant for dragonfly a i686 support is dropped since
release 40, but using long allows some compatibility for older versions.
-rw-r--r--src/libstd/os/dragonfly/raw.rs18
-rw-r--r--src/libstd/os/freebsd/raw.rs18
2 files changed, 20 insertions, 16 deletions
diff --git a/src/libstd/os/dragonfly/raw.rs b/src/libstd/os/dragonfly/raw.rs
index 56d69775a31..83e0be0d158 100644
--- a/src/libstd/os/dragonfly/raw.rs
+++ b/src/libstd/os/dragonfly/raw.rs
@@ -18,6 +18,8 @@
                               definitions")]
 #![allow(deprecated)]
 
+use os::raw::c_long;
+
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
@@ -49,17 +51,17 @@ pub struct stat {
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_rdev: u32,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_atime: i64,
+    pub st_atime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_atime_nsec: i64,
+    pub st_atime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_mtime: i64,
+    pub st_mtime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_mtime_nsec: i64,
+    pub st_mtime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_ctime: i64,
+    pub st_ctime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_ctime_nsec: i64,
+    pub st_ctime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_size: i64,
     #[stable(feature = "raw_ext", since = "1.1.0")]
@@ -73,7 +75,7 @@ pub struct stat {
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_lspare: i32,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_birthtime: i64,
+    pub st_birthtime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_birthtime_nsec: i64,
+    pub st_birthtime_nsec: c_long,
 }
diff --git a/src/libstd/os/freebsd/raw.rs b/src/libstd/os/freebsd/raw.rs
index ba8f57c415c..b16eab017e4 100644
--- a/src/libstd/os/freebsd/raw.rs
+++ b/src/libstd/os/freebsd/raw.rs
@@ -18,6 +18,8 @@
                               definitions")]
 #![allow(deprecated)]
 
+use os::raw::c_long;
+
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
@@ -49,17 +51,17 @@ pub struct stat {
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_rdev: u32,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_atime: i64,
+    pub st_atime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_atime_nsec: i64,
+    pub st_atime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_mtime: i64,
+    pub st_mtime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_mtime_nsec: i64,
+    pub st_mtime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_ctime: i64,
+    pub st_ctime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_ctime_nsec: i64,
+    pub st_ctime_nsec: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_size: i64,
     #[stable(feature = "raw_ext", since = "1.1.0")]
@@ -73,7 +75,7 @@ pub struct stat {
     #[stable(feature = "raw_ext", since = "1.1.0")]
     pub st_lspare: i32,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_birthtime: i64,
+    pub st_birthtime: c_long,
     #[stable(feature = "raw_ext", since = "1.1.0")]
-    pub st_birthtime_nsec: i64,
+    pub st_birthtime_nsec: c_long,
 }