about summary refs log tree commit diff
path: root/src/liblibc/lib.rs
diff options
context:
space:
mode:
authorChris Wong <lambda.fairy@gmail.com>2015-04-19 21:27:19 +1200
committerChris Wong <lambda.fairy@gmail.com>2015-04-21 17:13:36 +1200
commit1131bc0a0f9d4ce920f239dccbd0fcfe1c940548 (patch)
treeb020e8d15fa077748f031c429886d95415ac7a14 /src/liblibc/lib.rs
parent21c48c3e823ed21266e96779d700946db957a965 (diff)
downloadrust-1131bc0a0f9d4ce920f239dccbd0fcfe1c940548.tar.gz
rust-1131bc0a0f9d4ce920f239dccbd0fcfe1c940548.zip
Implement Debug for File
This patch adds a `Debug` impl for `std::fs::File`.

On all platforms (Unix and Windows) it shows the file descriptor.

On Linux, it displays the path and access mode as well.

Ideally we should show the path/mode for all platforms, not just Linux,
but this will do for now.

cc #24570
Diffstat (limited to 'src/liblibc/lib.rs')
-rw-r--r--src/liblibc/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index f7e92d61474..24a4a457224 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -3296,6 +3296,8 @@ pub mod consts {
             pub const F_GETFL : c_int = 3;
             pub const F_SETFL : c_int = 4;
 
+            pub const O_ACCMODE : c_int = 3;
+
             pub const SIGTRAP : c_int = 5;
             pub const SIG_IGN: size_t = 1;