summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-06-17 09:56:27 +0300
committerunknown <monty@mashka.mysql.fi>2002-06-17 09:56:27 +0300
commit92240b8ca37b80ba29f14f064de9059d9605edee (patch)
tree91c87c2e9dc4ad559145a6551e623daab59413c1
parenta17ad22af4d837020619f7480e89ff5bb0c066a6 (diff)
downloadmariadb-git-92240b8ca37b80ba29f14f064de9059d9605edee.tar.gz
Portability fix for HPUX
mysys/my_pthread.c: Portability fix BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--mysys/my_pthread.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 894bad3d0c4..5bc690d4061 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -23,3 +23,4 @@ serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi
zak@balfor.local
monty@narttu.
+monty@mashka.mysql.fi
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index b9b05e21375..696b62f8b0e 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -416,8 +416,15 @@ 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 || error == -1) ? ETIMEDOUT : error;
+ int error=pthread_cond_timedwait(cond, mutex, abstime);
+ if (error == -1) /* Safety if the lib is fixed */
+ {
+ if (!(error=errno))
+ error= ETIMEDOUT; /* Can happen on HPUX */
+ }
+ if (error == EAGAIN) /* Correct errno to Posix */
+ error= ETIMEDOUT;
+ return error;
}
#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */