summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys/unistd.h
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2003-07-10 15:31:30 +0000
committerJoern Rennecke <joern.rennecke@embecosm.com>2003-07-10 15:31:30 +0000
commite0bec12f55faa823e3f98375ad4c3e7ed36b6898 (patch)
treeac33522b8af77569c371e8fc8a5a84cd6f067d6d /newlib/libc/include/sys/unistd.h
parentd53f60a1e41c69b3c33a094f4a1d52aa28de4948 (diff)
downloadcygnal-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/include/sys/unistd.h')
-rw-r--r--newlib/libc/include/sys/unistd.h10
1 files changed, 6 insertions, 4 deletions
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));