1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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)
This commit is contained in:
Vladislav Vaintroub
2021-06-06 13:21:03 +02:00
parent 06dd151bb8
commit 3d6eb7afcf
132 changed files with 303 additions and 379 deletions

View File

@ -35,7 +35,7 @@
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#if !defined(__WIN__)
#if !defined(_WIN32)
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@ -46,7 +46,7 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#endif /* !defined(__WIN__) */
#endif /* !defined(_WIN32) */
#if defined(HAVE_POLL_H)
#include <poll.h>
#elif defined(HAVE_SYS_POLL_H)
@ -55,7 +55,7 @@
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#if !defined(__WIN__)
#if !defined(_WIN32)
#include <my_pthread.h> /* because of signal() */
#endif
#ifndef INADDR_NONE
@ -78,13 +78,13 @@ ulong max_allowed_packet= 1024L*1024L*1024L;
my_bool net_flush(NET *net);
#endif
#if defined(__WIN__)
#if defined(_WIN32)
/* socket_errno is defined in my_global.h for all platforms */
#define perror(A)
#else
#include <errno.h>
#define SOCKET_ERROR -1
#endif /* __WIN__ */
#endif /* _WIN32 */
/*
If allowed through some configuration, then this needs to
@ -167,7 +167,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
if (!mysql_unix_port)
{
char *env;
#ifdef __WIN__
#ifdef _WIN32
mysql_unix_port = (char*) MYSQL_NAMEDPIPE;
#else
mysql_unix_port = (char*) MYSQL_UNIX_ADDR;
@ -176,7 +176,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
mysql_unix_port = env;
}
mysql_debug(NullS);
#if defined(SIGPIPE) && !defined(__WIN__)
#if defined(SIGPIPE) && !defined(_WIN32)
(void) signal(SIGPIPE, SIG_IGN);
#endif
#ifdef EMBEDDED_LIBRARY
@ -421,7 +421,7 @@ struct passwd *getpwuid(uid_t);
char* getlogin(void);
#endif
#if !defined(__WIN__)
#if !defined(_WIN32)
void read_user_name(char *name)
{