diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-06-06 13:21:03 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-06-06 13:21:03 +0200 |
commit | 3d6eb7afcfb47cb432f790d0b25c8c1f4ec5bcf3 (patch) | |
tree | 0915add6039e740b9ab08baf215e435480c44526 /plugin | |
parent | 06dd151bb86ad5b87d4d46011f36da1289c01074 (diff) | |
download | mariadb-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 'plugin')
-rw-r--r-- | plugin/feedback/utils.cc | 2 | ||||
-rw-r--r-- | plugin/server_audit/server_audit.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc index e362446204f..bbbd5850089 100644 --- a/plugin/feedback/utils.cc +++ b/plugin/feedback/utils.cc @@ -246,7 +246,7 @@ int my_getncpus() { #ifdef _SC_NPROCESSORS_ONLN return sysconf(_SC_NPROCESSORS_ONLN); -#elif defined(__WIN__) +#elif defined(_WIN32) SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors; diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index bfabe763eb7..49d41627275 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -217,7 +217,7 @@ static int loc_rename(const char *from, const char *to) { int error = 0; -#if defined(__WIN__) +#if defined(_WIN32) if (!MoveFileEx(from, to, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING)) { @@ -1044,9 +1044,9 @@ static int get_user_host(const char *uh_line, unsigned int uh_len, return 0; } -#if defined(__WIN__) && !defined(S_ISDIR) +#if defined(_WIN32) && !defined(S_ISDIR) #define S_ISDIR(x) ((x) & _S_IFDIR) -#endif /*__WIN__ && !S_ISDIR*/ +#endif /*_WIN32 && !S_ISDIR*/ static int start_logging() { |