summaryrefslogtreecommitdiffstats
path: root/open_trunc.c
diff options
context:
space:
mode:
authorItamar Reis Peixoto <itamar@itamar.ispbrasil.com.br>2009-10-02 20:35:54 -0300
committerItamar Reis Peixoto <itamar@itamar.ispbrasil.com.br>2009-10-02 20:35:54 -0300
commit580c2e160be238f4abb46bd75fcf24bdd9768c2e (patch)
tree58d8c94f27e48d8aee8ff20ac7babb132b8eedee /open_trunc.c
downloadcdb-master.zip
cdb-master.tar.gz
cdb-master.tar.xz
initial importHEADmaster
Diffstat (limited to 'open_trunc.c')
-rw-r--r--open_trunc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/open_trunc.c b/open_trunc.c
new file mode 100644
index 0000000..77b99ef
--- /dev/null
+++ b/open_trunc.c
@@ -0,0 +1,6 @@
+#include <sys/types.h>
+#include <fcntl.h>
+#include "open.h"
+
+int open_trunc(char *fn)
+{ return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); }