diff options
Diffstat (limited to 'newlib/libc/machine/spu/creat.c')
-rw-r--r-- | newlib/libc/machine/spu/creat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/libc/machine/spu/creat.c b/newlib/libc/machine/spu/creat.c new file mode 100644 index 000000000..3cd714306 --- /dev/null +++ b/newlib/libc/machine/spu/creat.c @@ -0,0 +1,15 @@ +/* creat() "system call" */ + +/* copied from libc/posix/creat.c */ + +/* This is needed by f2c and therefore the SPEC benchmarks. */ + +#include <fcntl.h> + +int +_DEFUN(creat, (path, mode), + const char *path _AND + mode_t mode) +{ + return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); +} |