فهرست منبع

Fix export of O_ACCMODE

Jeremy Soller 6 سال پیش
والد
کامیت
33b539e4c1
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/header/fcntl/linux.rs
  2. 1 1
      src/header/fcntl/redox.rs

+ 1 - 1
src/header/fcntl/linux.rs

@@ -3,6 +3,7 @@ use platform::types::*;
 pub const O_RDONLY: c_int = 0x0000;
 pub const O_WRONLY: c_int = 0x0001;
 pub const O_RDWR: c_int = 0x0002;
+pub const O_ACCMODE: c_int = 0x0003;
 pub const O_CREAT: c_int = 0x0040;
 pub const O_EXCL: c_int = 0x0080;
 pub const O_TRUNC: c_int = 0x0200;
@@ -12,4 +13,3 @@ pub const O_DIRECTORY: c_int = 0x1_0000;
 pub const O_NOFOLLOW: c_int = 0x2_0000;
 pub const O_CLOEXEC: c_int = 0x8_0000;
 pub const O_PATH: c_int = 0x20_0000;
-pub const O_ACCMODE: c_int = O_RDONLY | O_WRONLY | O_RDWR;

+ 1 - 1
src/header/fcntl/redox.rs

@@ -3,6 +3,7 @@ use platform::types::*;
 pub const O_RDONLY: c_int = 0x0001;
 pub const O_WRONLY: c_int = 0x0002;
 pub const O_RDWR: c_int = 0x0003;
+pub const O_ACCMODE: c_int = 0x0003;
 pub const O_NONBLOCK: c_int = 0x0004;
 pub const O_APPEND: c_int = 0x0008;
 pub const O_SHLOCK: c_int = 0x0010;
@@ -17,4 +18,3 @@ pub const O_DIRECTORY: c_int = 0x1000;
 pub const O_PATH: c_int = 0x2000;
 pub const O_SYMLINK: c_int = 0x4000;
 pub const O_NOFOLLOW: c_int = 0x8000;
-pub const O_ACCMODE: c_int = O_RDONLY | O_WRONLY | O_RDWR;