Commit 22aac874 authored by Sergei Golubchik's avatar Sergei Golubchik

merged

parents ff71b82d 7da1887c
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=18
MYSQL_VERSION_EXTRA=-MariaDB
MYSQL_VERSION_EXTRA=
......@@ -115,9 +115,9 @@ IF(UNIX)
OPTION(WITH_LIBEDIT "" ON)
ENDIF()
OPTION(WITH_PIC "" ON) # Why?
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF(NOT IGNORE_AIO_CHECK)
# Ensure aio is available on Linux (required by InnoDB)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
......@@ -133,6 +133,14 @@ IF(UNIX)
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
")
ENDIF()
# Remove libaio dependency from mysqld
SET(XTRADB_PREFER_STATIC_LIBAIO 1)
# Unfortunately, linking shared libmysqld with static aio
# does not work, unless we add also dynamic one. This also means
# libmysqld.so will depend on libaio.so
SET(LIBMYSQLD_SO_EXTRA_LIBS aio)
ENDIF()
# Enable fast mutexes on Linux
......
......@@ -9,7 +9,7 @@
#include <custom_conf.h>
#else
#define PROTOCOL_VERSION @PROTOCOL_VERSION@
#define MYSQL_SERVER_VERSION "@VERSION@"
#define MYSQL_SERVER_VERSION "@VERSION@-MariaDB"
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
#define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@"
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
......
......@@ -158,6 +158,9 @@ IF(NOT DISABLE_SHARED)
# libmysqld
SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
IF(LIBMYSQLD_SO_EXTRA_LIBS)
TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS})
ENDIF()
ENDIF()
ENDIF()
......@@ -129,6 +129,7 @@ my_bool my_gethwaddr(uchar *to)
#elif defined(_WIN32)
#include <winsock2.h>
#include <iphlpapi.h>
#pragma comment(lib, "iphlpapi.lib")
#define ETHER_ADDR_LEN 6
......@@ -142,7 +143,7 @@ my_bool my_gethwaddr(uchar *to)
if (GetAdaptersInfo(info, &info_len) != ERROR_BUFFER_OVERFLOW)
goto err;
info= alloca(info_len);
info= (IP_ADAPTER_INFO *)alloca(info_len);
if (GetAdaptersInfo(info, &info_len) != NO_ERROR)
goto err;
......
......@@ -23,12 +23,18 @@ INCLUDE(CheckCSourceRuns)
IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H)
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
IF(HAVE_LIBAIO_H AND HAVE_LIBAIO)
IF (XTRADB_PREFER_STATIC_LIBAIO)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF()
FIND_LIBRARY(AIO_LIBRARY aio)
IF(AIO_LIBRARY)
CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO)
IF(HAVE_LIBAIO AND HAVE_LIBAIO_H)
ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
LINK_LIBRARIES(aio)
ENDIF()
LINK_LIBRARIES(${AIO_LIBRARY})
ENDIF()
ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")
......
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