summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2016-08-16 04:55:46 (GMT)
committerTony Theodore <tonyt@logyst.com>2016-08-16 14:41:14 (GMT)
commit42a5e3bad80775438dd28c55f2443dd047091b23 (patch)
tree135eb3c8db5300733dd2f36a4e035bd59b2b6c12
parent289ccdd3ee7fb64b89a7c7b90bdd4b86628e7f73 (diff)
downloadmxe-42a5e3bad80775438dd28c55f2443dd047091b23.zip
mxe-42a5e3bad80775438dd28c55f2443dd047091b23.tar.gz
mxe-42a5e3bad80775438dd28c55f2443dd047091b23.tar.bz2
unify mysql patches
-rw-r--r--src/libmysqlclient-1-fixes.patch79
-rw-r--r--src/libmysqlclient-2-posix-fixes.patch86
2 files changed, 79 insertions, 86 deletions
diff --git a/src/libmysqlclient-1-fixes.patch b/src/libmysqlclient-1-fixes.patch
index bae92e2..a6c0a8c 100644
--- a/src/libmysqlclient-1-fixes.patch
+++ b/src/libmysqlclient-1-fixes.patch
@@ -371,3 +371,82 @@ index 1111111..2222222 100644
IF (lib MATCHES "^\\-l")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "fix@me" <fix@me>
+Date: Fri, 13 Nov 2015 10:22:12 -0500
+Subject: [PATCH] For Windows, check if POSIX thread model or win32 thread
+ model is being used.
+
+
+diff --git a/configure.cmake b/configure.cmake
+index 1111111..2222222 100644
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -389,6 +389,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
+ CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H)
+ CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit
+ CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached
++CHECK_INCLUDE_FILES (pthread.h HAVE_PTHREAD_H)
+
+ # For libevent
+ CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL)
+diff --git a/include/my_pthread.h b/include/my_pthread.h
+index 1111111..2222222 100644
+--- a/include/my_pthread.h
++++ b/include/my_pthread.h
+@@ -20,7 +20,7 @@
+
+ #include "my_global.h" /* myf */
+
+-#if !defined(_WIN32)
++#if !(defined(_WIN32) && !defined(USING_PTHREADS))
+ #include <pthread.h>
+ #endif
+
+@@ -35,7 +35,7 @@ extern "C" {
+ #define EXTERNC
+ #endif /* __cplusplus */
+
+-#if defined(_WIN32)
++#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION)
+ typedef DWORD pthread_t;
+ #define pthread_self() GetCurrentThreadId()
+ #define pthread_handler_t EXTERNC void * __cdecl
+@@ -51,7 +51,7 @@ typedef DWORD pthread_t;
+ #include "thr_cond.h"
+ #include "thr_rwlock.h"
+
+-#if defined(_WIN32)
++#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION)
+ /*
+ Existing mysql_thread_create() or pthread_create() does not work well
+ in windows platform when threads are joined because
+diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/mysys/CMakeLists.txt
++++ b/mysys/CMakeLists.txt
+@@ -78,6 +78,10 @@ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
+ TARGET_LINK_LIBRARIES(mysys pthread)
+ ENDIF()
+
++IF(HAVE_PTHREAD_H)
++ ADD_DEFINITIONS(-DUSING_PTHREADS)
++ENDIF()
++
+ IF(WITH_UNIT_TESTS)
+
+ ADD_EXECUTABLE(thr_lock thr_lock.c)
+diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
+index 1111111..2222222 100644
+--- a/mysys/my_winthread.c
++++ b/mysys/my_winthread.c
+@@ -16,7 +16,7 @@
+ /*****************************************************************************
+ ** Simulation of posix threads calls for Windows
+ *****************************************************************************/
+-#if defined (_WIN32)
++#if defined (_WIN32) && !defined (USING_PTHREADS)
+ #include "mysys_priv.h"
+ #include <process.h>
+ #include <signal.h>
diff --git a/src/libmysqlclient-2-posix-fixes.patch b/src/libmysqlclient-2-posix-fixes.patch
deleted file mode 100644
index 51f9041..0000000
--- a/src/libmysqlclient-2-posix-fixes.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-This file is part of MXE.
-See index.html for further information.
-
-Contains ad hoc patches for cross building.
-
-From 6721189cf5ceeb34f47cc228d9a5d8a9cf9dfdb8 Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Fri, 13 Nov 2015 10:22:12 -0500
-Subject: [PATCH] For Windows, check if POSIX thread model or win32 thread
- model is being used.
-
-
-diff --git a/configure.cmake b/configure.cmake
-index a4f5e8f..8e623b8 100644
---- a/configure.cmake
-+++ b/configure.cmake
-@@ -389,6 +389,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
- CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H)
- CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit
- CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached
-+CHECK_INCLUDE_FILES (pthread.h HAVE_PTHREAD_H)
-
- # For libevent
- CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL)
-diff --git a/include/my_pthread.h b/include/my_pthread.h
-index 0a58cc0..abcffe8 100644
---- a/include/my_pthread.h
-+++ b/include/my_pthread.h
-@@ -20,7 +20,7 @@
-
- #include "my_global.h" /* myf */
-
--#if !defined(_WIN32)
-+#if !(defined(_WIN32) && !defined(USING_PTHREADS))
- #include <pthread.h>
- #endif
-
-@@ -35,7 +35,7 @@ extern "C" {
- #define EXTERNC
- #endif /* __cplusplus */
-
--#if defined(_WIN32)
-+#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION)
- typedef DWORD pthread_t;
- #define pthread_self() GetCurrentThreadId()
- #define pthread_handler_t EXTERNC void * __cdecl
-@@ -51,7 +51,7 @@ typedef DWORD pthread_t;
- #include "thr_cond.h"
- #include "thr_rwlock.h"
-
--#if defined(_WIN32)
-+#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION)
- /*
- Existing mysql_thread_create() or pthread_create() does not work well
- in windows platform when threads are joined because
-diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
-index e8e4972..322267c 100644
---- a/mysys/CMakeLists.txt
-+++ b/mysys/CMakeLists.txt
-@@ -78,6 +78,10 @@ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
- TARGET_LINK_LIBRARIES(mysys pthread)
- ENDIF()
-
-+IF(HAVE_PTHREAD_H)
-+ ADD_DEFINITIONS(-DUSING_PTHREADS)
-+ENDIF()
-+
- IF(WITH_UNIT_TESTS)
-
- ADD_EXECUTABLE(thr_lock thr_lock.c)
-diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
-index 7924fe4..b364030 100644
---- a/mysys/my_winthread.c
-+++ b/mysys/my_winthread.c
-@@ -16,7 +16,7 @@
- /*****************************************************************************
- ** Simulation of posix threads calls for Windows
- *****************************************************************************/
--#if defined (_WIN32)
-+#if defined (_WIN32) && !defined (USING_PTHREADS)
- #include "mysys_priv.h"
- #include <process.h>
- #include <signal.h>
---
-2.5.0
-