From e0bec12f55faa823e3f98375ad4c3e7ed36b6898 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Thu, 10 Jul 2003 15:31:30 +0000 Subject: * 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. --- newlib/libc/sys/sh/ftruncate.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 newlib/libc/sys/sh/ftruncate.c (limited to 'newlib/libc/sys/sh/ftruncate.c') 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 +#include "sys/syscall.h" + +int +ftruncate (int file, off_t length) +{ + return __trap34 (SYS_ftruncate, file, length, 0); +} -- cgit v1.2.3