From 6762b4c0672478680c2bc26088d2d6ea4ce167a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 16:29:14 +0300 Subject: Fixed pthread_cond_timedwait() for HPUX and DCE threads Cleanup of LIBWRAP handling Docs/manual.texi: Changelog include/my_pthread.h: Fixed pthread_cond_timedwait() for HPUX and DCE threads mysys/my_pthread.c: Fixed pthread_cond_timedwait() for HPUX and DCE threads sql/item_func.cc: Fixed the GET_LOCK() works with HPUX and DCE threads sql/mysqld.cc: Cleanup of LIBWRAP handling sql/sql_parse.cc: Safety fix --- include/my_pthread.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/my_pthread.h') diff --git a/include/my_pthread.h b/include/my_pthread.h index cd72bcced83..30e9ea95e02 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,6 +349,13 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif +#if defined(HAVE_DEC_THREADS) +extern int my_pthread_cond_timedwait(pthread_cond_t *cond, + pthread_mutex_t *mutex, + struct timespec *abstime); +#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C)) +#endif + #if defined(OS2) #define my_pthread_getspecific(T,A) ((T) &(A)) #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)) -- cgit v1.2.1 From 22ae963c4e2842af587d6522e768bda7c86fb546 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Apr 2002 21:19:00 +0300 Subject: Small fix for HP-UX 10.20 with DCE threads Also --with-libwrap is tested on Linux just fine. configure.in: Small fix for HP-UX 10.20 with DCE threads include/my_pthread.h: Small fix for HP-UX 10.20 with DCE threads mysys/my_pthread.c: Small fix for HP-UX 10.20 with DCE threads --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/my_pthread.h') diff --git a/include/my_pthread.h b/include/my_pthread.h index 30e9ea95e02..4c90882e76b 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_DEC_THREADS) +#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) extern int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime); -- cgit v1.2.1 From ad67401fe99d802242f01efa564cbcb7ef2ca143 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 May 2002 16:32:51 +0300 Subject: New my_gethostbyname_r() handling Changed some status variable names Fix bug in GRANT ... PASSWORD string Docs/manual.texi: Update of variable names include/my_net.h: New my_gethostbyname_r() handling include/my_pthread.h: New my_gethostbyname_r() handling libmysql/Makefile.shared: New my_gethostbyname_r() handling libmysql/libmysql.c: New my_gethostbyname_r() handling mysys/Makefile.am: New my_gethostbyname_r() handling mysys/my_pthread.c: New my_gethostbyname_r() handling mysys/my_thr_init.c: New my_gethostbyname_r() handling sql/hostname.cc: New my_gethostbyname_r() handling sql/mini_client.cc: New my_gethostbyname_r() handling sql/mysqld.cc: change some status variable names sql/sql_acl.cc: Fix bug in GRANT ... PASSWORD string --- include/my_pthread.h | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'include/my_pthread.h') diff --git a/include/my_pthread.h b/include/my_pthread.h index 4c90882e76b..24e73707288 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -426,31 +426,6 @@ struct tm *localtime_r(const time_t *clock, struct tm *res); #define HAVE_PTHREAD_KILL #endif -#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -#if !defined(HPUX) -struct hostent; -#endif /* HPUX */ -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#else -#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ - -#else -#ifdef HAVE_GETHOSTBYNAME_R_RETURN_INT -#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -#else -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) -#endif /* HAVE_GETHOSTBYNAME_R_RETURN_INT */ -#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ - #endif /* defined(__WIN__) */ /* safe_mutex adds checking to mutex for easier debugging */ -- cgit v1.2.1 From 4e7ca4595d126f87588a7caab299baf3f1ebc55b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 May 2002 15:49:32 +0300 Subject: A small fix for HP-UX when used --with-debug --- include/my_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/my_pthread.h') diff --git a/include/my_pthread.h b/include/my_pthread.h index 24e73707288..bcad292ecc9 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -349,7 +349,7 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority); #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) +#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) extern int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime); -- cgit v1.2.1