summaryrefslogtreecommitdiff
path: root/include/mysql.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-06-06 13:21:03 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-06-06 13:21:03 +0200
commit3d6eb7afcfb47cb432f790d0b25c8c1f4ec5bcf3 (patch)
tree0915add6039e740b9ab08baf215e435480c44526 /include/mysql.h
parent06dd151bb86ad5b87d4d46011f36da1289c01074 (diff)
downloadmariadb-git-3d6eb7afcfb47cb432f790d0b25c8c1f4ec5bcf3.tar.gz
MDEV-25602 get rid of __WIN__ in favor of standard _WIN32
This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
Diffstat (limited to 'include/mysql.h')
-rw-r--r--include/mysql.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 6ff4c6d3fad..87def05dc7e 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -32,13 +32,6 @@
#include <standards.h>
#endif
-#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
-#undef WIN
-#undef _WIN
-#undef _WIN32
-#undef _WIN64
-#undef __WIN__
-#endif
#ifdef __cplusplus
extern "C" {
@@ -53,10 +46,7 @@ extern "C" {
typedef char my_bool;
#endif
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
-#define __WIN__
-#endif
-#if !defined(__WIN__)
+#if !defined(_WIN32)
#define STDCALL
#else
#define STDCALL __stdcall
@@ -130,7 +120,7 @@ typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
#ifndef MY_GLOBAL_INCLUDED
#if defined(NO_CLIENT_LONG_LONG)
typedef unsigned long my_ulonglong;
-#elif defined (__WIN__)
+#elif defined (_WIN32)
typedef unsigned __int64 my_ulonglong;
#else
typedef unsigned long long my_ulonglong;