Commit 7714adae authored by Sergei Golubchik's avatar Sergei Golubchik

build on windows

parent 952e4067
...@@ -285,12 +285,7 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") ...@@ -285,12 +285,7 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
ENDIF() ENDIF()
ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(include)
IF(CMAKE_GENERATOR MATCHES "Makefiles" AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") ADD_SUBDIRECTORY(dbug)
SET(DBUG_LIBRARY)
ELSE()
SET(DBUG_LIBRARY dbug)
ADD_SUBDIRECTORY(dbug)
ENDIF()
ADD_SUBDIRECTORY(strings) ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(regex) ADD_SUBDIRECTORY(regex)
......
...@@ -86,6 +86,8 @@ ...@@ -86,6 +86,8 @@
#include <m_string.h> #include <m_string.h>
#include <errno.h> #include <errno.h>
#ifndef DBUG_OFF
#ifdef HAVE_FNMATCH_H #ifdef HAVE_FNMATCH_H
#include <fnmatch.h> #include <fnmatch.h>
#else #else
...@@ -424,7 +426,7 @@ void _db_process_(const char *name) ...@@ -424,7 +426,7 @@ void _db_process_(const char *name)
* 0 - a list of functions was not changed * 0 - a list of functions was not changed
*/ */
int DbugParse(CODE_STATE *cs, const char *control) static int DbugParse(CODE_STATE *cs, const char *control)
{ {
const char *end; const char *end;
int rel, f_used=0; int rel, f_used=0;
...@@ -661,8 +663,8 @@ int DbugParse(CODE_STATE *cs, const char *control) ...@@ -661,8 +663,8 @@ int DbugParse(CODE_STATE *cs, const char *control)
(ListFlags(cs->stack->functions) & INCLUDE) ? \ (ListFlags(cs->stack->functions) & INCLUDE) ? \
0 : (uint)TRACE_ON) 0 : (uint)TRACE_ON)
void FixTraceFlags_helper(CODE_STATE *cs, const char *func, static void FixTraceFlags_helper(CODE_STATE *cs, const char *func,
struct _db_stack_frame_ *framep) struct _db_stack_frame_ *framep)
{ {
if (framep->prev) if (framep->prev)
FixTraceFlags_helper(cs, framep->func, framep->prev); FixTraceFlags_helper(cs, framep->func, framep->prev);
...@@ -687,7 +689,7 @@ void FixTraceFlags_helper(CODE_STATE *cs, const char *func, ...@@ -687,7 +689,7 @@ void FixTraceFlags_helper(CODE_STATE *cs, const char *func,
#define fflags(cs) cs->stack->out_file ? ListFlags(cs->stack->functions) : TRACE_ON; #define fflags(cs) cs->stack->out_file ? ListFlags(cs->stack->functions) : TRACE_ON;
void FixTraceFlags(uint old_fflags, CODE_STATE *cs) static void FixTraceFlags(uint old_fflags, CODE_STATE *cs)
{ {
const char *func; const char *func;
uint new_fflags, traceon, level; uint new_fflags, traceon, level;
...@@ -2491,3 +2493,5 @@ static void sf_terminate() ...@@ -2491,3 +2493,5 @@ static void sf_terminate()
return; return;
} }
#endif /* DBUG_OFF */
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
fixed so that it could compile and run in MySQL source tree fixed so that it could compile and run in MySQL source tree
*/ */
#ifdef DBUG_OFF /* We are testing dbug */
#undef DBUG_OFF
#endif
#include <my_global.h> /* This includes dbug.h */ #include <my_global.h> /* This includes dbug.h */
#include <my_pthread.h> #include <my_pthread.h>
...@@ -16,9 +12,6 @@ char *argv[]; ...@@ -16,9 +12,6 @@ char *argv[];
{ {
register int result, ix; register int result, ix;
extern int factorial(int); extern int factorial(int);
#if defined(HAVE_PTHREAD_INIT)
pthread_init(); /* Must be called before DBUG_ENTER */
#endif
my_thread_global_init(); my_thread_global_init();
{ {
......
...@@ -150,7 +150,7 @@ ADD_CONVENIENCE_LIBRARY(clientlib ${CLIENT_SOURCES}) ...@@ -150,7 +150,7 @@ ADD_CONVENIENCE_LIBRARY(clientlib ${CLIENT_SOURCES})
DTRACE_INSTRUMENT(clientlib) DTRACE_INSTRUMENT(clientlib)
ADD_DEPENDENCIES(clientlib GenError) ADD_DEPENDENCIES(clientlib GenError)
SET(LIBS clientlib ${DBUG_LIBRARY} strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL}) SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL})
# Merge several convenience libraries into one big mysqlclient # Merge several convenience libraries into one big mysqlclient
# and link them together into shared library. # and link them together into shared library.
......
...@@ -113,7 +113,7 @@ ENDIF() ...@@ -113,7 +113,7 @@ ENDIF()
SET(LIBS SET(LIBS
${DBUG_LIBRARY} strings regex mysys vio dbug strings regex mysys vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${ZLIB_LIBRARY} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
${MYSQLD_STATIC_PLUGIN_LIBS} ${MYSQLD_STATIC_PLUGIN_LIBS}
......
...@@ -66,7 +66,7 @@ IF(HAVE_MLOCK) ...@@ -66,7 +66,7 @@ IF(HAVE_MLOCK)
ENDIF() ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys ${DBUG_LIBRARY} strings ${ZLIB_LIBRARY} TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${LIBNSL} ${LIBM} ${LIBRT}) ${LIBNSL} ${LIBM} ${LIBRT})
DTRACE_INSTRUMENT(mysys) DTRACE_INSTRUMENT(mysys)
......
...@@ -92,7 +92,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE}) ...@@ -92,7 +92,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
ADD_DEPENDENCIES(sql GenServerSource) ADD_DEPENDENCIES(sql GenServerSource)
DTRACE_INSTRUMENT(sql) DTRACE_INSTRUMENT(sql)
TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS} TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
mysys ${DBUG_LIBRARY} strings vio regex mysys dbug strings vio regex
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
${SSL_LIBRARIES}) ${SSL_LIBRARIES})
......
...@@ -22,7 +22,7 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create ...@@ -22,7 +22,7 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create
MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED) MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED)
ADD_EXECUTABLE(hp_test1 hp_test1.c) ADD_EXECUTABLE(hp_test1 hp_test1.c)
TARGET_LINK_LIBRARIES(hp_test1 heap mysys ${DBUG_LIBRARY} strings) TARGET_LINK_LIBRARIES(hp_test1 heap mysys dbug strings)
ADD_EXECUTABLE(hp_test2 hp_test2.c) ADD_EXECUTABLE(hp_test2 hp_test2.c)
TARGET_LINK_LIBRARIES(hp_test2 heap mysys ${DBUG_LIBRARY} strings) TARGET_LINK_LIBRARIES(hp_test2 heap mysys dbug strings)
...@@ -35,6 +35,9 @@ Created 9/5/1995 Heikki Tuuri ...@@ -35,6 +35,9 @@ Created 9/5/1995 Heikki Tuuri
#include "sync0sync.ic" #include "sync0sync.ic"
#endif #endif
/* disable timed_mutexes - obsolete feature that doesn't link on windows */
#define timed_mutexes 0
#include "sync0rw.h" #include "sync0rw.h"
#include "buf0buf.h" #include "buf0buf.h"
#include "srv0srv.h" #include "srv0srv.h"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/unittest/mytap) ${CMAKE_SOURCE_DIR}/unittest/mytap)
LINK_LIBRARIES(aria myisam mytap mysys ${DBUG_LIBRARY} strings ${ZLIB_LIBRARY}) LINK_LIBRARIES(aria myisam mytap mysys dbug strings ${ZLIB_LIBRARY})
MY_ADD_TESTS(ma_control_file trnman) MY_ADD_TESTS(ma_control_file trnman)
......
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