summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-04-16 01:50:25 -0700
committerunknown <brian@zim.(none)>2006-04-16 01:50:25 -0700
commit2623949e12a76935b365af2737634630461a61f7 (patch)
tree0302df0e47ad8749257dda529e671c3500a58983
parentcc62983ca2be9fe0559d3f5a326bb7284c08c4cb (diff)
downloadmariadb-git-2623949e12a76935b365af2737634630461a61f7.tar.gz
This completes the work done in 5.0 to remove mit_pthread support (most was pulled in 5.0, but there were some pieces left in the tree)
include/my_global.h: mit_thread removal include/my_pthread.h: mit_thread removal mysys/my_file.c: mit_thread removal mysys/my_pthread.c: Removal of mit_thread mysys/my_thr_init.c: Removal of mit_thread
-rw-r--r--include/my_global.h25
-rw-r--r--include/my_pthread.h17
-rw-r--r--mysys/my_file.c2
-rw-r--r--mysys/my_pthread.c4
-rw-r--r--mysys/my_thr_init.c4
5 files changed, 7 insertions, 45 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 42a93fb5e63..2401f4c015a 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -264,7 +264,6 @@
#if !defined(_THREAD_SAFE) && !defined(_AIX)
#define _THREAD_SAFE /* Required for OSF1 */
#endif
-#ifndef HAVE_mit_thread
#ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h>
#else
@@ -276,7 +275,6 @@ C_MODE_END
#include <pthread.h> /* AIX must have this included first */
#endif
#endif /* HAVE_UNIXWARE7_THREADS */
-#endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT)
#define _REENTRANT 1 /* Threads requires reentrant code */
#endif
@@ -606,19 +604,9 @@ C_MODE_START
typedef int (*qsort_cmp)(const void *,const void *);
typedef int (*qsort_cmp2)(void*, const void *,const void *);
C_MODE_END
-#ifdef HAVE_mit_thread
-#define qsort_t void
-#undef QSORT_TYPE_IS_VOID
-#define QSORT_TYPE_IS_VOID
-#else
#define qsort_t RETQSORTTYPE /* Broken GCC cant handle typedef !!!! */
-#endif
-#ifdef HAVE_mit_thread
-#define size_socket socklen_t /* Type of last arg to accept */
-#else
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-#endif
typedef SOCKET_SIZE_TYPE size_socket;
#endif
@@ -743,21 +731,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define ulong_to_double(X) ((double) (ulong) (X))
#define SET_STACK_SIZE(X) /* Not needed on real machines */
-#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
+#if !defined(HAVE_STRTOK_R)
#define strtok_r(A,B,C) strtok((A),(B))
#endif
-/* Remove some things that mit_thread break or doesn't support */
-#if defined(HAVE_mit_thread) && defined(THREAD)
-#undef HAVE_PREAD
-#undef HAVE_REALPATH
-#undef HAVE_MLOCK
-#undef HAVE_TEMPNAM /* Use ours */
-#undef HAVE_PTHREAD_SETPRIO
-#undef HAVE_FTRUNCATE
-#undef HAVE_READLINK
-#endif
-
/* This is from the old m-machine.h file */
#if SIZEOF_LONG_LONG > 4
diff --git a/include/my_pthread.h b/include/my_pthread.h
index c05907b47fa..1bed3b4ccfb 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -249,21 +249,6 @@ extern int my_pthread_create_detached;
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
#define USE_ALARM_THREAD
-#elif defined(HAVE_mit_thread)
-#define USE_ALARM_THREAD
-#undef HAVE_LOCALTIME_R
-#define HAVE_LOCALTIME_R
-#undef HAVE_GMTIME_R
-#define HAVE_GMTIME_R
-#undef HAVE_PTHREAD_ATTR_SETSCOPE
-#define HAVE_PTHREAD_ATTR_SETSCOPE
-#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE /* If we are running linux */
-#undef HAVE_RWLOCK_T
-#undef HAVE_RWLOCK_INIT
-#undef HAVE_PTHREAD_RWLOCK_RDLOCK
-#undef HAVE_SNPRINTF
-
-#define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
@@ -291,7 +276,7 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
#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)
+#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif
diff --git a/mysys/my_file.c b/mysys/my_file.c
index 28d77cdf8b8..4c333c7d7db 100644
--- a/mysys/my_file.c
+++ b/mysys/my_file.c
@@ -33,7 +33,7 @@
May be more or less than max_file_limit!
*/
-#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE) && !defined(HAVE_mit_thread)
+#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE)
#ifndef RLIM_INFINITY
#define RLIM_INFINITY ((uint) 0xffffffff)
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 9a1810b9c1d..b8eeb0a3f3f 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -24,7 +24,7 @@
#include <m_string.h>
#include <thr_alarm.h>
-#if (defined(__BSD__) || defined(_BSDI_VERSION)) && !defined(HAVE_mit_thread)
+#if (defined(__BSD__) || defined(_BSDI_VERSION))
#define SCHED_POLICY SCHED_RR
#else
#define SCHED_POLICY SCHED_OTHER
@@ -190,7 +190,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res)
** Author: Gary Wisniewski <garyw@spidereye.com.au>, much modified by Monty
****************************************************************************/
-#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(sigwait) && !defined(__WIN__) && !defined(HAVE_rts_threads) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS)
+#if !defined(HAVE_SIGWAIT) && !defined(sigwait) && !defined(__WIN__) && !defined(HAVE_rts_threads) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS)
#if !defined(DONT_USE_SIGSUSPEND)
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 7fb7439aa82..9013cd6e79d 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -217,7 +217,7 @@ void my_thread_end(void)
tmp->dbug=0;
}
#endif
-#if !defined(__bsdi__) && !defined(__OpenBSD__) || defined(HAVE_mit_thread)
+#if !defined(__bsdi__) && !defined(__OpenBSD__)
/* bsdi and openbsd 3.5 dumps core here */
pthread_cond_destroy(&tmp->suspend);
#endif
@@ -260,7 +260,7 @@ long my_thread_id()
{
#if defined(HAVE_PTHREAD_GETSEQUENCE_NP)
return pthread_getsequence_np(pthread_self());
-#elif (defined(__sun) || defined(__sgi) || defined(__linux__)) && !defined(HAVE_mit_thread)
+#elif (defined(__sun) || defined(__sgi) || defined(__linux__))
return pthread_self();
#else
return my_thread_var->id;