diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2003-07-10 19:31:30 +0400 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@embecosm.com> | 2003-07-10 19:31:30 +0400 |
commit | e0bec12f55faa823e3f98375ad4c3e7ed36b6898 (patch) | |
tree | ac33522b8af77569c371e8fc8a5a84cd6f067d6d /newlib/libc/sys/sh/truncate.c | |
parent | d53f60a1e41c69b3c33a094f4a1d52aa28de4948 (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/truncate.c')
-rw-r--r-- | newlib/libc/sys/sh/truncate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/sys/sh/truncate.c b/newlib/libc/sys/sh/truncate.c new file mode 100644 index 000000000..5ca48d3c6 --- /dev/null +++ b/newlib/libc/sys/sh/truncate.c @@ -0,0 +1,9 @@ +#include <_ansi.h> +#include <sys/types.h> +#include "sys/syscall.h" + +int +truncate (const char *path, off_t length) +{ + return __trap34 (SYS_truncate, path, length, 0); +} |