summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-06-13 17:44:24 +0000
committerJeff Johnston <jjohnstn@redhat.com>2007-06-13 17:44:24 +0000
commita8b08518c115928e471b02cf200cf54b2462f048 (patch)
treeb5360122fa1113f8326bd330a8cb71e30b1d7016 /newlib/libc/include
parent8905d0dcfde388f376367767b0f450dbbeeef90c (diff)
downloadcygnal-a8b08518c115928e471b02cf200cf54b2462f048.tar.gz
cygnal-a8b08518c115928e471b02cf200cf54b2462f048.tar.bz2
cygnal-a8b08518c115928e471b02cf200cf54b2462f048.zip
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/features.h: Define _POSIX_TIMERS for spu. * libc/include/sys/unistd.h: Change usleep prototype to Posix form and move outside of OS flag checks. * libc/machine/spu/Makefile.am: Add sleep and usleep. * libc/machine/spu/Makefile.in: Regenerate. * libc/machine/spu/sleep.c: Copy libc/posix/sleep.c. * libc/machine/spu/usleep.c: Copy libc/posix/usleep.c.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/sys/features.h5
-rw-r--r--newlib/libc/include/sys/unistd.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index a088d82b1..196aaae64 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -166,6 +166,11 @@ extern "C" {
#endif
+#ifdef __SPU__
+/* Not much for now! */
+#define _POSIX_TIMERS 1
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 15a21dcd3..a43263935 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -154,6 +154,7 @@ char _EXFUN(*ttyname, (int __fildes ));
int _EXFUN(ttyname_r, (int, char *, size_t));
#endif
int _EXFUN(unlink, (const char *__path ));
+int _EXFUN(usleep, (useconds_t __useconds));
int _EXFUN(vhangup, (void ));
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
@@ -199,11 +200,11 @@ 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 (_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));