Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2003-07-10 19:31:30 +0400
committerJoern Rennecke <joern.rennecke@embecosm.com>2003-07-10 19:31:30 +0400
commite0bec12f55faa823e3f98375ad4c3e7ed36b6898 (patch)
treeac33522b8af77569c371e8fc8a5a84cd6f067d6d /newlib/libc/sys/sh/ftruncate.c
parentd53f60a1e41c69b3c33a094f4a1d52aa28de4948 (diff)
* 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.c9
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);
+}