1 /*
2  * reimplementation of Daniel Bernstein's unix library.
3  * placed in the public domain by Uwe Ohse, uwe@ohse.de.
4  */
5 #include <sys/types.h>
6 #include <fcntl.h>
7 #include "open.h"
8 
open_trunc(const char * fn)9 int open_trunc(const char *fn)
10 { return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); }
11 
open_trunc_mode(const char * fname,int mode)12 int open_trunc_mode(const char *fname,int mode)
13 { return open(fname,O_WRONLY | O_TRUNC | O_CREAT | O_NDELAY,mode); }
14 
open_trunc_blocking(const char * fname,int mode)15 int open_trunc_blocking(const char *fname,int mode)
16 { return open(fname,O_WRONLY | O_TRUNC | O_CREAT ,mode); }
17 
18