diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-13 17:55:28 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-13 17:55:28 +0000 |
commit | c33ff7855e85a47e3b08b5e971d7110207e4a55b (patch) | |
tree | f3435178e25b89486a2fd18f21523864719d96ab /newlib/libc/machine/spu/creat.c | |
parent | ae473bdc48f84566747813f185aae709d6119e0d (diff) | |
download | cygnal-c33ff7855e85a47e3b08b5e971d7110207e4a55b.tar.gz cygnal-c33ff7855e85a47e3b08b5e971d7110207e4a55b.tar.bz2 cygnal-c33ff7855e85a47e3b08b5e971d7110207e4a55b.zip |
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/creat.c: New file copied from libc/posix/creat.c,
it just calls open with appropriate arguments.
* libc/machine/spu/Makefile.am: Add creat.c.
* libc/machine/spu/Makefile.in: Regenerate.
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); +} |