summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <peter@mysql.com>2002-08-08 18:21:13 +0400
committerunknown <peter@mysql.com>2002-08-08 18:21:13 +0400
commit7c6fae29f482fbccd25b2b12c8ec0df9d1f8ee4b (patch)
tree67238e6ba680fb8ac43be9f347bbeef1ec99fd2d /mysys
parent26d3263617766b0c95e1e14fba022b834fb14206 (diff)
parent028cfaba9ba0fcbba30511e6951daab6a1829f20 (diff)
downloadmariadb-git-7c6fae29f482fbccd25b2b12c8ec0df9d1f8ee4b.tar.gz
Merge mysql.com:/home/pz/mysql/mysql-4.0-root
into mysql.com:/home/pz/mysql/mysql-4.0
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_pthread.c8
-rw-r--r--mysys/my_semaphore.c1
2 files changed, 8 insertions, 1 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 38451f1f79a..cb37fe7c73f 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -438,6 +438,12 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
#ifdef HPUX
+/*
+ In HP-UX-10.20 and other old Posix 1003.4a Draft 4 implementations
+ pthread_mutex_trylock returns 1 on success, not 0 like
+ pthread_mutex_lock
+*/
+
int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
{
int error=pthread_mutex_trylock(mutex);
@@ -447,9 +453,9 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
error=errno;
return error;
}
-
#endif
+
/* Some help functions */
int pthread_no_free(void *not_used __attribute__((unused)))
diff --git a/mysys/my_semaphore.c b/mysys/my_semaphore.c
index de4aac1cdbd..2dd224cd99e 100644
--- a/mysys/my_semaphore.c
+++ b/mysys/my_semaphore.c
@@ -21,6 +21,7 @@
#include <my_global.h>
#include <my_semaphore.h>
+#include <errno.h>
#if !defined(__WIN__) && !defined(HAVE_SEMAPHORE_H)