diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2003-07-10 15:31:30 +0000 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@embecosm.com> | 2003-07-10 15:31:30 +0000 |
commit | e0bec12f55faa823e3f98375ad4c3e7ed36b6898 (patch) | |
tree | ac33522b8af77569c371e8fc8a5a84cd6f067d6d /newlib/libc/sys/sh/ftruncate.c | |
parent | d53f60a1e41c69b3c33a094f4a1d52aa28de4948 (diff) | |
download | cygnal-e0bec12f55faa823e3f98375ad4c3e7ed36b6898.tar.gz cygnal-e0bec12f55faa823e3f98375ad4c3e7ed36b6898.tar.bz2 cygnal-e0bec12f55faa823e3f98375ad4c3e7ed36b6898.zip |
* libc/include/sys/unistd.h (ftruncate, truncate): Also declare
for __sh__.
* libc/sys/sh/Makefile.am (lib_a_SOURCES): Add ftruncate.c and
truncate.c.
* libc/sys/sh/Makefile.in: Regenerate.
* libc/sys/sh/sys/syscall.h: (SYS_truncate, SYS_ftruncate): Define.
* libc/sys/sh/ftruncate.c: New file.
* libc/sys/sh/truncate.c: Likewise.
Diffstat (limited to 'newlib/libc/sys/sh/ftruncate.c')
-rw-r--r-- | newlib/libc/sys/sh/ftruncate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/sys/sh/ftruncate.c b/newlib/libc/sys/sh/ftruncate.c new file mode 100644 index 000000000..660377bf3 --- /dev/null +++ b/newlib/libc/sys/sh/ftruncate.c @@ -0,0 +1,9 @@ +#include <_ansi.h> +#include <sys/types.h> +#include "sys/syscall.h" + +int +ftruncate (int file, off_t length) +{ + return __trap34 (SYS_ftruncate, file, length, 0); +} |