summaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/list_test.c2
-rw-r--r--tests/nonblock-wrappers.h4
-rw-r--r--tests/showdb_test.c2
-rw-r--r--tests/ssl_test.c2
-rw-r--r--tests/thread_test.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/tests/list_test.c b/tests/list_test.c
index 42d4f962b19..6c915d470b7 100644
--- a/tests/list_test.c
+++ b/tests/list_test.c
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#ifdef __WIN__
+#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
diff --git a/tests/nonblock-wrappers.h b/tests/nonblock-wrappers.h
index 78851854442..19737c8d04a 100644
--- a/tests/nonblock-wrappers.h
+++ b/tests/nonblock-wrappers.h
@@ -22,7 +22,7 @@
Used to test the non-blocking calls using mysql_client_test.
*/
-#ifndef __WIN__
+#ifndef _WIN32
#include <poll.h>
#else
#include <WinSock2.h>
@@ -35,7 +35,7 @@
static int
wait_for_mysql(MYSQL *mysql, int status)
{
-#ifdef __WIN__
+#ifdef _WIN32
fd_set rs, ws, es;
int res;
struct timeval tv, *timeout;
diff --git a/tests/showdb_test.c b/tests/showdb_test.c
index 267e32d51d7..e6b8989e36c 100644
--- a/tests/showdb_test.c
+++ b/tests/showdb_test.c
@@ -15,7 +15,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#ifdef __WIN__
+#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
diff --git a/tests/ssl_test.c b/tests/ssl_test.c
index 6102fc7fd4e..d15d553b67a 100644
--- a/tests/ssl_test.c
+++ b/tests/ssl_test.c
@@ -15,7 +15,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
-#ifdef __WIN__
+#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
diff --git a/tests/thread_test.c b/tests/thread_test.c
index 0fa92d505a3..a40b4d20870 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -28,7 +28,7 @@ static pthread_mutex_t LOCK_thread_count;
static char *database,*host,*user,*password,*unix_socket,*query;
uint tcp_port;
-#ifndef __WIN__
+#ifndef _WIN32
void *test_thread(void *arg __attribute__((unused)))
#else
unsigned __stdcall test_thread(void *arg __attribute__((unused)))