Commit 4ee9e66d authored by Hakan Kuecuekyilmaz's avatar Hakan Kuecuekyilmaz

Make MariaDB compile with VS 2010

Most of the changes are backports from MySQL 5.5. Please note
that the 64-bit build fails with VS 2010 and the 32-bit build
has problems running mysql-test-run.pl.
      
* Added files for compiling with VS 2010 and added them
to Makefile.am.
* ifdef'ed ETIMEDOUT, because it is defined by VS 2010 now
* Removed not needed /MAP's from cmake files
parent 84074519
...@@ -116,8 +116,7 @@ IF(MSVC) ...@@ -116,8 +116,7 @@ IF(MSVC)
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT}) STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
# generate map files, set stack size (see bug#20815) # set stack size (see bug#20815)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")
# remove support for Exception handling # remove support for Exception handling
......
...@@ -128,7 +128,9 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp); ...@@ -128,7 +128,9 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define ETIMEDOUT 145 /* Win32 doesn't have this */ #ifndef ETIMEDOUT
#define ETIMEDOUT 145
#endif
#define getpid() GetCurrentThreadId() #define getpid() GetCurrentThreadId()
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
#define _REENTRANT 1 #define _REENTRANT 1
......
...@@ -18,7 +18,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG ...@@ -18,7 +18,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_C_FLAGS_DEBUG SET(CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /MAP /MAPINFO:EXPORTS")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/extra/yassl/include
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat build-vs9.bat \ EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat build-vs9.bat \
build-vs9_x64.bat configure.js README mysql_manifest.cmake \ build-vs9_x64.bat configure.js README mysql_manifest.cmake \
create_manifest.js create_def_file.js build-nmake.bat \ create_manifest.js create_def_file.js build-nmake.bat \
build-nmake-x64.bat configure-mariadb.sh make_mariadb_win_dist build-nmake-x64.bat configure-mariadb.sh make_mariadb_win_dist \
build-vs10.bat build-vs10_x64.bat
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
@echo off
REM Copyright (C) 2010 Monty Program AB
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; version 2 of the License.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program; if not, write to the Free Software
REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
cmake -G "Visual Studio 10"
@echo off
REM Copyright (C) 2010 Monty Program AB
REM
REM This program is free software; you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation; version 2 of the License.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program; if not, write to the Free Software
REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
cmake -G "Visual Studio 10 Win64"
...@@ -15,9 +15,7 @@ cscript win/configure.js \ ...@@ -15,9 +15,7 @@ cscript win/configure.js \
WITH_FEDERATED_STORAGE_ENGINE \ WITH_FEDERATED_STORAGE_ENGINE \
WITH_MERGE_STORAGE_ENGINE \ WITH_MERGE_STORAGE_ENGINE \
WITH_PARTITION_STORAGE_ENGINE \ WITH_PARTITION_STORAGE_ENGINE \
WITH_MARIA_STORAGE_ENGINE \ WITH_MARIA_STORAGE_ENGINE \
WITH_PBXT_STORAGE_ENGINE \ WITH_PBXT_STORAGE_ENGINE \
WITH_XTRADB_STORAGE_ENGINE \ WITH_XTRADB_STORAGE_ENGINE \
WITH_EMBEDDED_SERVER WITH_EMBEDDED_SERVER
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