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/include/sys/unistd.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'newlib/libc/include/sys/unistd.h') diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 85a2f7aae..50afeafbc 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -175,15 +175,17 @@ int _EXFUN(_unlink, (const char *__path )); _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte )); int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); +#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__) +#if !defined(__INSIDE_CYGWIN__) +int _EXFUN(ftruncate, (int __fd, off_t __length)); +int _EXFUN(truncate, (const char *, off_t __length)); +#endif +#endif #if defined(__CYGWIN__) || defined(__rtems__) int _EXFUN(getdtablesize, (void)); int _EXFUN(setdtablesize, (int)); useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); unsigned _EXFUN(usleep, (unsigned int __useconds)); -#if !defined(__INSIDE_CYGWIN__) -int _EXFUN(ftruncate, (int __fd, off_t __length)); -int _EXFUN(truncate, (const char *, off_t __length)); -#endif #if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) /* winsock[2].h defines as __stdcall, and with int as 2nd arg */ int _EXFUN(gethostname, (char *__name, size_t __len)); -- cgit v1.2.3