summaryrefslogtreecommitdiffstats
path: root/libjava/include
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-07 14:11:09 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-07 14:11:09 +0000
commitfa0e80a6f37b2f73856f8d1d072024a139fbbdd7 (patch)
tree8a359c4f4ba44389169ebad721ec1d18cd2714c9 /libjava/include
parent1a2ae8d8fe6ab644d2fd37d1d6dc0e4c5173e15d (diff)
downloadppe42-gcc-fa0e80a6f37b2f73856f8d1d072024a139fbbdd7.tar.gz
ppe42-gcc-fa0e80a6f37b2f73856f8d1d072024a139fbbdd7.zip
* configure.in: Check for usleep declaration.
* acconfig.h (HAVE_USLEEP_DECL): Provide template. * configure: Regenerate. * include/config.h.in: Likewise. * include/posix.h [!HAVE_USLEEP_DECL]: Declare usleep. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69041 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/config.h.in6
-rw-r--r--libjava/include/posix.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in
index c6b376867f0..daf11ca1ad8 100644
--- a/libjava/include/config.h.in
+++ b/libjava/include/config.h.in
@@ -114,6 +114,9 @@
/* Define if gethostbyaddr_r returns `int'. */
#undef GETHOSTBYADDR_R_RETURNS_INT
+/* Define if usleep is declared in <unistd.h>. */
+#undef HAVE_USLEEP_DECL
+
/* Define if struct tm has tm_gmtoff field. */
#undef STRUCT_TM_HAS_GMTOFF
@@ -319,6 +322,9 @@
/* Define if you have the unlink function. */
#undef HAVE_UNLINK
+/* Define if you have the usleep function. */
+#undef HAVE_USLEEP
+
/* Define if you have the utime function. */
#undef HAVE_UTIME
diff --git a/libjava/include/posix.h b/libjava/include/posix.h
index 52cc6d2cfde..2c6054ec93c 100644
--- a/libjava/include/posix.h
+++ b/libjava/include/posix.h
@@ -92,6 +92,10 @@ _Jv_platform_close_on_exec (jint fd)
#undef fcntl
#ifdef JV_HASH_SYNCHRONIZATION
+#ifndef HAVE_USLEEP_DECL
+extern "C" int usleep (useconds_t useconds);
+#endif /* not HAVE_USLEEP_DECL */
+
inline void
_Jv_platform_usleep (unsigned long usecs)
{
OpenPOWER on IntegriCloud