summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2015-09-08 21:50:39 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2015-09-08 21:50:39 (GMT)
commit63da70e10083c862cfc2b47b904e7d25b7b78e55 (patch)
tree022d4b3483f5821213e8cdedd29f13f51efd22bb
parent86c68e521ff32b9e902d109baa9c79f08878d6d6 (diff)
downloadmxe-63da70e10083c862cfc2b47b904e7d25b7b78e55.zip
mxe-63da70e10083c862cfc2b47b904e7d25b7b78e55.tar.gz
mxe-63da70e10083c862cfc2b47b904e7d25b7b78e55.tar.bz2
libmysqlclient: _MSC_VER instead of NATIVE_WIN32
See #839
-rw-r--r--src/libmysqlclient-5-macro-native-win32.patch23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/libmysqlclient-5-macro-native-win32.patch b/src/libmysqlclient-5-macro-native-win32.patch
index 53b104f..794d618 100644
--- a/src/libmysqlclient-5-macro-native-win32.patch
+++ b/src/libmysqlclient-5-macro-native-win32.patch
@@ -36,21 +36,12 @@ diff --git a/include/my_global.h b/include/my_global.h
index acadb44..c71b9c2 100644
--- a/include/my_global.h
+++ b/include/my_global.h
-@@ -25,6 +25,8 @@
- #define __STDC_FORMAT_MACROS /* Enable C99 printf format macros */
- #define _USE_MATH_DEFINES /* Get access to M_PI, M_E, etc. in math.h */
-
-+#define NATIVE_WIN32 (defined(_WIN32) && !defined(__MINGW32__))
-+
- #ifdef _WIN32
- /* Include common headers.*/
- # include <winsock2.h>
@@ -205,7 +207,7 @@ C_MODE_START
typedef int (*qsort_cmp)(const void *,const void *);
typedef int (*qsort_cmp2)(const void*, const void *,const void *);
C_MODE_END
-#ifdef _WIN32
-+#if NATIVE_WIN32
++#ifdef _MSC_VER
typedef int socket_len_t;
typedef int sigset_t;
typedef int mode_t;
@@ -60,7 +51,7 @@ index acadb44..c71b9c2 100644
+#endif
+
-+#if NATIVE_WIN32
++#ifdef _MSC_VER
/*
Declare a union to make sure FILETIME is properly aligned
@@ -69,7 +60,7 @@ index acadb44..c71b9c2 100644
static inline void set_timespec_nsec(struct timespec *abstime, ulonglong nsec)
{
-#ifndef _WIN32
-+#if !NATIVE_WIN32
++#ifndef _MSC_VER
ulonglong now= my_getsystime() + (nsec / 100);
abstime->tv_sec= now / 10000000ULL;
abstime->tv_nsec= (now % 10000000ULL) * 100 + (nsec % 100);
@@ -78,7 +69,7 @@ index acadb44..c71b9c2 100644
static inline int cmp_timespec(struct timespec *ts1, struct timespec *ts2)
{
-#ifndef _WIN32
-+#if !NATIVE_WIN32
++#ifndef _MSC_VER
if (ts1->tv_sec > ts2->tv_sec ||
(ts1->tv_sec == ts2->tv_sec && ts1->tv_nsec > ts2->tv_nsec))
return 1;
@@ -87,7 +78,7 @@ index acadb44..c71b9c2 100644
static inline ulonglong diff_timespec(struct timespec *ts1, struct timespec *ts2)
{
-#ifndef _WIN32
-+#if !NATIVE_WIN32
++#ifndef _MSC_VER
return (ts1->tv_sec - ts2->tv_sec) * 1000000000ULL +
ts1->tv_nsec - ts2->tv_nsec;
#else
@@ -100,7 +91,7 @@ index 480e936..bd8e394 100644
#endif
-#ifdef _WIN32
-+#if NATIVE_WIN32
++#ifdef _MSC_VER
/**
Convert abstime to milliseconds
*/
@@ -122,7 +113,7 @@ index 226d469..45d37b1 100644
#include "my_stacktrace.h"
-#ifndef _WIN32
-+#if !NATIVE_WIN32
++#ifndef _MSC_VER
#include "my_pthread.h"
#include "m_string.h"
#include <signal.h>