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
sinisa@rhols221.adsl.netsonic.fi
zak@balfor.local
monty@narttu.
monty@mashka.mysql.fi
......@@ -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 */
......
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