summaryrefslogtreecommitdiff
path: root/src/io/fd.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-07-17 16:50:40 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-07-17 23:35:14 -0700
commit25070b355b8a0394c1fbd9cf82c44752b5a8b8c3 (patch)
tree5e8edf1e5e3f58a8b11b1fcdd2fa851b2322df35 /src/io/fd.hpp
parent3b0b6deecf156916a9fb68dda9ca4b8a47d65aab (diff)
downloadtmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.gz
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.bz2
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.xz
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.zip
Add dir annoyances
Diffstat (limited to 'src/io/fd.hpp')
-rw-r--r--src/io/fd.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/io/fd.hpp b/src/io/fd.hpp
index 6fb745d..d04d5bf 100644
--- a/src/io/fd.hpp
+++ b/src/io/fd.hpp
@@ -56,8 +56,13 @@ namespace io
FD stdout() { return FD(1); }
static
FD stderr() { return FD(2); }
+
+ static const int DEFAULT_MODE = 0666;
+
static
- FD open(ZString path, int flags, int mode=0666);
+ FD open(ZString path, int flags, int mode=DEFAULT_MODE);
+ static
+ FD openat(FD dirfd, ZString path, int flags, int mode=DEFAULT_MODE);
static
FD socket(int domain, int type, int protocol);
FD accept(struct sockaddr *addr, socklen_t *addrlen);
@@ -65,6 +70,7 @@ namespace io
int pipe(FD& r, FD& w);
static
int pipe2(FD& r, FD& w, int flags);
+
static
FD sysconf_SC_OPEN_MAX();