summaryrefslogtreecommitdiff
path: root/vio
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 /vio
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 'vio')
-rw-r--r--vio/viosocket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vio/viosocket.c b/vio/viosocket.c
index f84d0e0738b..f63c76c9c79 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -25,7 +25,7 @@
*/
#include "vio_priv.h"
-#ifdef __WIN__
+#ifdef _WIN32
#include <winsock2.h>
#include <MSWSock.h>
#include <mstcpip.h>
@@ -300,7 +300,7 @@ int vio_socket_shutdown(Vio *vio, int how)
int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
{
int r= 0;
-#if defined(__WIN__) || !defined(NO_FCNTL_NONBLOCK)
+#if defined(_WIN32) || !defined(NO_FCNTL_NONBLOCK)
my_socket sd= mysql_socket_getfd(vio->mysql_socket);
#endif
DBUG_ENTER("vio_blocking");
@@ -309,7 +309,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d",
(int) set_blocking_mode, (int) *old_mode));
-#if !defined(__WIN__)
+#if !defined(_WIN32)
#if !defined(NO_FCNTL_NONBLOCK)
if (sd >= 0)
{
@@ -331,7 +331,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
#else
r= set_blocking_mode ? 0 : 1;
#endif /* !defined(NO_FCNTL_NONBLOCK) */
-#else /* !defined(__WIN__) */
+#else /* !defined(_WIN32) */
if (vio->type != VIO_TYPE_NAMEDPIPE)
{
ulong arg;
@@ -351,7 +351,7 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
}
else
r= MY_TEST(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode;
-#endif /* !defined(__WIN__) */
+#endif /* !defined(_WIN32) */
DBUG_PRINT("exit", ("%d", r));
DBUG_RETURN(r);
}