summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-20 23:26:39 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-20 23:26:39 +0300
commit2e20fc9a2c0696a8c31fe47e6a18550cc50bd112 (patch)
treeeacae5fd082021efcb17098eab511ba6b6465dde
parent8d1568b88206aad44c7c934178e1da6a23cbbc67 (diff)
downloadmariadb-git-2e20fc9a2c0696a8c31fe47e6a18550cc50bd112.tar.gz
Fixes for compiling distribution with MIT-threads
client/mysql.cc: Fixes for MIT-pthreads libmysqld/examples/Makefile.am: Fixes for MIT-pthreads mit-pthreads/machdep/linux-2.0/__string.h: Fixes for MIT-pthreads mysys/my_thr_init.c: Fixed spelling error.
-rw-r--r--client/mysql.cc6
-rw-r--r--libmysqld/examples/Makefile.am2
-rwxr-xr-xmit-pthreads/machdep/linux-2.0/__string.h2
-rw-r--r--mysys/my_thr_init.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 47fdf840d3e..d6eabc1a567 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1491,7 +1491,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
static void init_pager()
{
-#if !defined( __WIN__) && !defined( OS2)
+#if !defined( __WIN__) && !defined( OS2) && (!defined(HAVE_mit_thread) && defined(THREAD))
if (!opt_nopager)
{
if (!(PAGER= popen(pager, "w")))
@@ -1507,7 +1507,7 @@ static void init_pager()
static void end_pager()
{
-#if !defined( __WIN__) && !defined( OS2)
+#if !defined( __WIN__) && !defined( OS2) && (!defined(HAVE_mit_thread) && defined(THREAD))
if (!opt_nopager)
pclose(PAGER);
#endif
@@ -2498,9 +2498,11 @@ void tee_putc(int c, FILE *file)
#include <time.h>
#else
#include <sys/times.h>
+#ifdef _SC_CLK_TCK // For mit-pthreads
#undef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC (sysconf(_SC_CLK_TCK))
#endif
+#endif
static ulong start_timer(void)
{
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index ecfcbccd322..98d38531f64 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -8,7 +8,7 @@ link_sources:
done;
DEFS = -DEMBEDDED_LIBRARY
-INCLUDES = -I$(top_srcdir)/include $(openssl_includes) \
+INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) \
-I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/client
LIBS = @LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS)
diff --git a/mit-pthreads/machdep/linux-2.0/__string.h b/mit-pthreads/machdep/linux-2.0/__string.h
index 8a5e09608e0..d958a2bbe69 100755
--- a/mit-pthreads/machdep/linux-2.0/__string.h
+++ b/mit-pthreads/machdep/linux-2.0/__string.h
@@ -5,7 +5,6 @@ typedef pthread_size_t size_t;
#endif
/* Non-standard Linux string routines. */
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
__BEGIN_DECLS
int bcmp __P_((const void *, const void *, size_t));
void bcopy __P_((const void *, void *, size_t));
@@ -15,4 +14,3 @@ char *rindex __P_((const char *, int));
char *strdup __P_((const char *));
char *strsep __P_((char **, const char *));
__END_DECLS
-#endif
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 9f91f7a392d..45c10e5a7b6 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -55,7 +55,7 @@ my_bool my_thread_global_init(void)
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_setkind_np(&my_fast_mutexattr,PTHREAD_MUTEX_ADAPTIVE_NP);
#endif
-#ifdef PPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_init(&my_errchk_mutexattr);
pthread_mutexattr_setkind_np(&my_errchk_mutexattr,
PTHREAD_MUTEX_ERRORCHECK_NP);