Commit 92240b8c authored by unknown's avatar unknown

Portability fix for HPUX


mysys/my_pthread.c:
  Portability fix
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent a17ad22a
...@@ -23,3 +23,4 @@ serg@sergbook.mysql.com ...@@ -23,3 +23,4 @@ serg@sergbook.mysql.com
sinisa@rhols221.adsl.netsonic.fi sinisa@rhols221.adsl.netsonic.fi
zak@balfor.local zak@balfor.local
monty@narttu. monty@narttu.
monty@mashka.mysql.fi
...@@ -416,8 +416,15 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, ...@@ -416,8 +416,15 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond,
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
struct timespec *abstime) struct timespec *abstime)
{ {
int error=pthread_cond_timedwait(cond,mutex,abstime); int error=pthread_cond_timedwait(cond, mutex, abstime);
return (error == EAGAIN || error == -1) ? ETIMEDOUT : error; 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 */ #endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment