Commit b4fb0ec1 authored by unknown's avatar unknown

Portability changes


Docs/manual.texi:
  Comment about timestamp
include/my_pthread.h:
  Portability fix
mysys/thr_rwlock.c:
  Fix for hpux
parent e286d8c5
......@@ -28286,6 +28286,8 @@ aren't specified.
You should have a primary key in the table.
@item
You should have a timestamp in all tables you want to be able to update.
For maximum portability @code{TIMESTAMP(14)} or simple @code{TIMESTAMP}
is recommended instead of other @code{TIMESTAMP(X)} variations.
@item
Only use double float fields. Access fails when comparing with single floats.
@item
......@@ -279,7 +279,7 @@ extern int my_pthread_create_detached;
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
int sigwait(const sigset_t *set, int *sig);
int sigwait(sigset_t *set, int *sig);
#endif
#if defined(HAVE_UNIXWARE7_POSIX)
......@@ -309,7 +309,7 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
#endif
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(const sigset_t *setp, int *sigp); /* Use our implemention */
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif
#if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset)
#define sigset(A,B) do { struct sigaction s; sigset_t set; \
......
......@@ -65,8 +65,13 @@ int my_rwlock_init( rw_lock_t *rwp, void *arg __attribute__((unused)))
pthread_mutex_init( &rwp->lock, NULL );
pthread_condattr_init( &cond_attr );
#ifdef HAVE_PTHREAD_CONDATTR_CREATE /* HPUX 11.0 */
pthread_cond_init( &rwp->readers, cond_attr );
pthread_cond_init( &rwp->writers, cond_attr );
#else
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
#endif
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
......
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