1 /* Copyright (c) 2007 Patrick Mansfield <patmans@us.ibm.com> */ 2 /* creat() "system call" */ 3 4 /* copied from libc/posix/creat.c */ 5 6 /* This is needed by f2c and therefore the SPEC benchmarks. */ 7 8 #include <fcntl.h> 9 10 int creat(const char * path,mode_t mode)11creat (const char *path, 12 mode_t mode) 13 { 14 return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); 15 } 16