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 <picolibc.h> 9 10 #include <fcntl.h> 11 12 int creat(const char * path,mode_t mode)13creat (const char *path, 14 mode_t mode) 15 { 16 return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); 17 } 18