summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authormonty@tik.mysql.fi <>2002-04-16 16:29:14 +0300
committermonty@tik.mysql.fi <>2002-04-16 16:29:14 +0300
commitc0d9954cc79c51702c582f17ea7891ea77e0ee3a (patch)
tree1ffc14ca2c35e314c452fe5d5169332a4e892d85 /mysys
parentabb3e50199da0dbbd05dbca3037380c240a33187 (diff)
downloadmariadb-git-c0d9954cc79c51702c582f17ea7891ea77e0ee3a.tar.gz
Fixed pthread_cond_timedwait() for HPUX and DCE threads
Cleanup of LIBWRAP handling
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_pthread.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 8bdbc0f7fd8..8c6b366e9b1 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -410,9 +410,23 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif
+/* Change functions on HP to work according to POSIX */
+
+#ifdef HAVE_DEC_THREADS
+#undef pthread_cond_timedwait
+
+int my_pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ struct timespec *abstime)
+{
+ int error=pthread_cond_timedwait(cond,mutex,abstime);
+ return error == EAGAIN ? ETIMEDOUT : error;
+}
+#endif /* HAVE_DEC_THREADS */
+
/*
-** Emulate SOLARIS style calls, not because it's better, but just to make the
-** usage of getbostbyname_r simpler.
+ Emulate SOLARIS style calls, not because it's better, but just to make the
+ usage of getbostbyname_r simpler.
*/
#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)