aboutsummaryrefslogtreecommitdiff
path: root/libbutl/fdstream.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-24 14:07:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-24 14:07:40 +0200
commit21acf9701d5f26ccc8c76775b0a3e1616e3b4ddd (patch)
tree9c9d821ea45412891f7716d7998eeae84d2a877e /libbutl/fdstream.ixx
parent9efe8d1ed5ee210ae644b7118f1d674a2de5f3e8 (diff)
Add std*_fd() functions
Diffstat (limited to 'libbutl/fdstream.ixx')
-rw-r--r--libbutl/fdstream.ixx20
1 files changed, 20 insertions, 0 deletions
diff --git a/libbutl/fdstream.ixx b/libbutl/fdstream.ixx
index 5181903..212ec98 100644
--- a/libbutl/fdstream.ixx
+++ b/libbutl/fdstream.ixx
@@ -286,4 +286,24 @@ namespace butl
static_cast<std::uint16_t> (x) |
static_cast<std::uint16_t> (y));
}
+
+ // std*_fdmode()
+ //
+ inline fdstream_mode
+ stdin_fdmode (fdstream_mode m)
+ {
+ return fdmode (stdin_fd (), m);
+ }
+
+ inline fdstream_mode
+ stdout_fdmode (fdstream_mode m)
+ {
+ return fdmode (stdout_fd (), m);
+ }
+
+ inline fdstream_mode
+ stderr_fdmode (fdstream_mode m)
+ {
+ return fdmode (stderr_fd (), m);
+ }
}