summaryrefslogtreecommitdiff
path: root/src/unix
diff options
context:
space:
mode:
authorLuke Petre <lpetre@gmail.com>2019-08-16 06:31:47 +0100
committerLuke Petre <lpetre@gmail.com>2019-08-17 06:37:25 +0100
commit2b158cefc22460afe2b278fc4b196ab332cef319 (patch)
tree45ed3af6403712ee875c336ad8e7efb4c7842d78 /src/unix
parent4bd0c0002631b09ca0f15d93c3101701dea83826 (diff)
downloadrust-libc-2b158cefc22460afe2b278fc4b196ab332cef319.tar.gz
Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensat
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/bsd/apple/mod.rs3
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs3
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs3
-rw-r--r--src/unix/haiku/mod.rs3
-rw-r--r--src/unix/solarish/mod.rs3
5 files changed, 15 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 24ad12bee5..904bfe00b0 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -2823,6 +2823,9 @@ pub const P_ALL: idtype_t = 0;
pub const P_PID: idtype_t = 1;
pub const P_PGID: idtype_t = 2;
+pub const UTIME_OMIT: c_long = -2;
+pub const UTIME_NOW: c_long = -1;
+
pub const XATTR_NOFOLLOW: ::c_int = 0x0001;
pub const XATTR_CREATE: ::c_int = 0x0002;
pub const XATTR_REPLACE: ::c_int = 0x0004;
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index fea680d2af..62d416406a 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -1041,6 +1041,9 @@ pub const P_PID: idtype_t = 0;
pub const P_PGID: idtype_t = 2;
pub const P_ALL: idtype_t = 7;
+pub const UTIME_OMIT: c_long = -2;
+pub const UTIME_NOW: c_long = -1;
+
pub const B460800: ::speed_t = 460800;
pub const B921600: ::speed_t = 921600;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 893b15752a..c4e03adea7 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1357,6 +1357,9 @@ pub const P_ALL: idtype_t = 0;
pub const P_PID: idtype_t = 1;
pub const P_PGID: idtype_t = 4;
+pub const UTIME_OMIT: c_long = 1073741822;
+pub const UTIME_NOW: c_long = 1073741823;
+
pub const B460800: ::speed_t = 460800;
pub const B921600: ::speed_t = 921600;
diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs
index c8cf8ad25d..fe1929f9bb 100644
--- a/src/unix/haiku/mod.rs
+++ b/src/unix/haiku/mod.rs
@@ -1039,6 +1039,9 @@ pub const P_ALL: idtype_t = 0;
pub const P_PID: idtype_t = 1;
pub const P_PGID: idtype_t = 2;
+pub const UTIME_OMIT: c_long = 1000000001;
+pub const UTIME_NOW: c_long = 1000000000;
+
pub const VINTR: usize = 0;
pub const VQUIT: usize = 1;
pub const VERASE: usize = 2;
diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs
index 78956146ad..f8a64547d4 100644
--- a/src/unix/solarish/mod.rs
+++ b/src/unix/solarish/mod.rs
@@ -965,6 +965,9 @@ pub const P_CTID: idtype_t = 13;
pub const P_CPUID: idtype_t = 14;
pub const P_PSETID: idtype_t = 15;
+pub const UTIME_OMIT: c_long = -2;
+pub const UTIME_NOW: c_long = -1;
+
pub const PROT_NONE: ::c_int = 0;
pub const PROT_READ: ::c_int = 1;
pub const PROT_WRITE: ::c_int = 2;