diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-11-02 16:56:15 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-11-02 16:56:15 -0800 |
commit | 0f7e88e7bc9b4d68ce439fc37335dd6ebece4d4a (patch) | |
tree | a7e10e76997de7ccaae524ac2d380660aca59054 | |
parent | 7a83039ee9b3df2a851de617fd7c52807d1da5cf (diff) | |
parent | 14f7e02705e223b3b6e8929fed30afefb66badab (diff) | |
download | rust-libc-0f7e88e7bc9b4d68ce439fc37335dd6ebece4d4a.tar.gz |
Merge pull request #26 from alexcrichton/cloexec
Add some CLOEXEC constants
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 2 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/mod.rs | 2 | ||||
-rw-r--r-- | src/unix/bsd/openbsdlike/mod.rs | 1 | ||||
-rw-r--r-- | src/unix/notbsd/android/mod.rs | 3 | ||||
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 2 | ||||
-rw-r--r-- | src/unix/notbsd/mod.rs | 1 |
6 files changed, 9 insertions, 2 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index e50eb49ade..b7cf3b176c 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -161,6 +161,7 @@ pub const O_CREAT: ::c_int = 512; pub const O_EXCL: ::c_int = 2048; pub const O_NOCTTY: ::c_int = 131072; pub const O_TRUNC: ::c_int = 1024; +pub const O_CLOEXEC: ::c_int = 0x1000000; pub const S_IFIFO: mode_t = 4096; pub const S_IFCHR: mode_t = 8192; pub const S_IFBLK: mode_t = 24576; @@ -195,6 +196,7 @@ pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; pub const F_TLOCK: ::c_int = 2; pub const F_ULOCK: ::c_int = 0; +pub const F_DUPFD_CLOEXEC: ::c_int = 67; pub const SIGHUP: ::c_int = 1; pub const SIGINT: ::c_int = 2; pub const SIGQUIT: ::c_int = 3; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d4342eae3c..a6ceee76af 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -111,6 +111,7 @@ pub const O_CREAT: ::c_int = 512; pub const O_EXCL: ::c_int = 2048; pub const O_NOCTTY: ::c_int = 32768; pub const O_TRUNC: ::c_int = 1024; +pub const O_CLOEXEC: ::c_int = 0x00100000; pub const S_IFIFO: mode_t = 4096; pub const S_IFCHR: mode_t = 8192; pub const S_IFBLK: mode_t = 24576; @@ -145,6 +146,7 @@ pub const F_LOCK: ::c_int = 1; pub const F_TEST: ::c_int = 3; pub const F_TLOCK: ::c_int = 2; pub const F_ULOCK: ::c_int = 0; +pub const F_DUPFD_CLOEXEC: ::c_int = 17; pub const SIGHUP: ::c_int = 1; pub const SIGINT: ::c_int = 2; pub const SIGQUIT: ::c_int = 3; diff --git a/src/unix/bsd/openbsdlike/mod.rs b/src/unix/bsd/openbsdlike/mod.rs index d78c4171fa..b21f851c76 100644 --- a/src/unix/bsd/openbsdlike/mod.rs +++ b/src/unix/bsd/openbsdlike/mod.rs @@ -123,6 +123,7 @@ pub const O_CREAT : c_int = 512; pub const O_EXCL : c_int = 2048; pub const O_NOCTTY : c_int = 32768; pub const O_TRUNC : c_int = 1024; +pub const O_CLOEXEC: ::c_int = 0x10000; pub const S_IFIFO : mode_t = 4096; pub const S_IFCHR : mode_t = 8192; pub const S_IFBLK : mode_t = 24576; diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 051b7577ab..86db969a22 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -181,8 +181,6 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { }; pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const O_SYNC: ::c_int = 0x1000; - pub const FIOCLEX: ::c_ulong = 0x5451; pub const SA_ONSTACK: ::c_ulong = 0x08000000; @@ -194,6 +192,7 @@ pub const SIGBUS: ::c_int = 7; pub const SIG_SETMASK: ::c_int = 2; pub const O_ACCMODE: ::c_int = 3; +pub const O_SYNC: ::c_int = 0x1000; pub const RUSAGE_CHILDREN: ::c_int = -1; diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 27f7a682d9..4c45991b0a 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -223,6 +223,8 @@ pub const MAP_32BIT: ::c_int = 0x0040; pub const TCP_MD5SIG: ::c_int = 14; +pub const F_DUPFD_CLOEXEC: ::c_int = 1030; + pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __align: [], size: [0; __SIZEOF_PTHREAD_MUTEX_T], diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 2cc900e0e2..ed84bef247 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -122,6 +122,7 @@ pub const O_RDONLY: ::c_int = 0; pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; pub const O_TRUNC: ::c_int = 512; +pub const O_CLOEXEC: ::c_int = 0x80000; pub const S_IFIFO: ::mode_t = 4096; pub const S_IFCHR: ::mode_t = 8192; pub const S_IFBLK: ::mode_t = 24576; |