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 /client/mysql.cc | |
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 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 2bb3f2309d6..d22a3d49b16 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -88,7 +88,7 @@ extern "C" { #endif /* defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) */ #undef bcmp // Fix problem with new readline -#if defined(__WIN__) +#if defined(_WIN32) #include <conio.h> #else #include <readline.h> @@ -1587,7 +1587,7 @@ static struct my_option my_long_options[] = {"password", 'p', "Password to use when connecting to server. If password is not given it's asked from the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, -#ifdef __WIN__ +#ifdef _WIN32 {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif @@ -1893,7 +1893,7 @@ get_one_option(const struct my_option *opt, const char *argument, const char *fi set_if_bigger(opt_silent,1); // more silent break; case 'W': -#ifdef __WIN__ +#ifdef _WIN32 opt_protocol = MYSQL_PROTOCOL_PIPE; opt_protocol_type= "pipe"; @@ -2026,7 +2026,7 @@ static int get_options(int argc, char **argv) static int read_and_execute(bool interactive) { -#if defined(__WIN__) +#if defined(_WIN32) String tmpbuf; String buffer; #endif @@ -2106,7 +2106,7 @@ static int read_and_execute(bool interactive) if (opt_outfile && glob_buffer.is_empty()) fflush(OUTFILE); -#if defined(__WIN__) +#if defined(_WIN32) tee_fputs(prompt, stdout); if (!tmpbuf.is_alloced()) tmpbuf.alloc(65535); @@ -2139,7 +2139,7 @@ static int read_and_execute(bool interactive) if (line) free(line); line= readline(prompt); -#endif /* defined(__WIN__) */ +#endif /* defined(_WIN32) */ /* When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS @@ -2194,7 +2194,7 @@ static int read_and_execute(bool interactive) } } -#if defined(__WIN__) +#if defined(_WIN32) buffer.free(); tmpbuf.free(); #else |