summaryrefslogtreecommitdiff
path: root/nacl/curvecp/open_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/curvecp/open_write.c')
-rw-r--r--nacl/curvecp/open_write.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/nacl/curvecp/open_write.c b/nacl/curvecp/open_write.c
deleted file mode 100644
index e23752d1..00000000
--- a/nacl/curvecp/open_write.c
+++ /dev/null
@@ -1,17 +0,0 @@
1#include <sys/types.h>
2#include <sys/stat.h>
3#include <unistd.h>
4#include <fcntl.h>
5#include "open.h"
6
7int open_write(const char *fn)
8{
9#ifdef O_CLOEXEC
10 return open(fn,O_CREAT | O_WRONLY | O_NONBLOCK | O_CLOEXEC,0644);
11#else
12 int fd = open(fn,O_CREAT | O_WRONLY | O_NONBLOCK,0644);
13 if (fd == -1) return -1;
14 fcntl(fd,F_SETFD,1);
15 return fd;
16#endif
17}