From 6762b4c0672478680c2bc26088d2d6ea4ce167a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 16:29:14 +0300 Subject: Fixed pthread_cond_timedwait() for HPUX and DCE threads Cleanup of LIBWRAP handling Docs/manual.texi: Changelog include/my_pthread.h: Fixed pthread_cond_timedwait() for HPUX and DCE threads mysys/my_pthread.c: Fixed pthread_cond_timedwait() for HPUX and DCE threads sql/item_func.cc: Fixed the GET_LOCK() works with HPUX and DCE threads sql/mysqld.cc: Cleanup of LIBWRAP handling sql/sql_parse.cc: Safety fix --- mysys/my_pthread.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'mysys') 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) -- cgit v1.2.1 From 22ae963c4e2842af587d6522e768bda7c86fb546 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 21:19:00 +0300 Subject: Small fix for HP-UX 10.20 with DCE threads Also --with-libwrap is tested on Linux just fine. configure.in: Small fix for HP-UX 10.20 with DCE threads include/my_pthread.h: Small fix for HP-UX 10.20 with DCE threads mysys/my_pthread.c: Small fix for HP-UX 10.20 with DCE threads --- mysys/my_pthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysys') diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 8c6b366e9b1..72409b6aa86 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -412,7 +412,7 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr) /* Change functions on HP to work according to POSIX */ -#ifdef HAVE_DEC_THREADS +#ifdef HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT #undef pthread_cond_timedwait int my_pthread_cond_timedwait(pthread_cond_t *cond, @@ -422,7 +422,7 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, int error=pthread_cond_timedwait(cond,mutex,abstime); return error == EAGAIN ? ETIMEDOUT : error; } -#endif /* HAVE_DEC_THREADS */ +#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */ /* Emulate SOLARIS style calls, not because it's better, but just to make the -- cgit v1.2.1