소스 검색

Added some constants in linux for file modes

Tom Almeida 7 년 전
부모
커밋
aa8b14e107
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/fcntl/src/lib.rs

+ 6 - 0
src/fcntl/src/lib.rs

@@ -18,6 +18,12 @@ pub const O_CREAT: c_int = 0x0040;
 pub const O_TRUNC: c_int = 0x0200;
 #[cfg(target_os = "linux")]
 pub const O_ACCMODE: c_int = O_RDONLY | O_WRONLY | O_RDWR;
+#[cfg(target_os = "linux")]
+pub const O_APPEND: c_int = 0o2000;
+#[cfg(target_os = "linux")]
+pub const O_CLOEXEC: c_int = 0o2_000_000;
+#[cfg(target_os = "linux")]
+pub const O_EXCL: c_int = 0o200;
 
 #[cfg(target_os = "redox")]
 pub const O_RDONLY: c_int = 0x0001_0000;