diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 2003-07-07 14:11:09 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2003-07-07 14:11:09 +0000 |
commit | 6b3517eaf567c4b740e4d339369d081cc3a10e38 (patch) | |
tree | 8a359c4f4ba44389169ebad721ec1d18cd2714c9 /libjava/include | |
parent | a8784c4c8fce72ffbc1cd1cc8f9c07f71a99f15b (diff) | |
download | gcc-6b3517eaf567c4b740e4d339369d081cc3a10e38.zip gcc-6b3517eaf567c4b740e4d339369d081cc3a10e38.tar.gz gcc-6b3517eaf567c4b740e4d339369d081cc3a10e38.tar.bz2 |
configure.in: Check for usleep declaration.
* 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.
From-SVN: r69041
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/config.h.in | 6 | ||||
-rw-r--r-- | libjava/include/posix.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index c6b3768..daf11ca 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 52cc6d2..2c6054e 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) { |