summaryrefslogtreecommitdiff
path: root/storage/connect/odbconn.cpp
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-08-02 10:11:41 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2021-08-02 10:11:41 +0200
commit6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea (patch)
treeb7c1a18b8bbc638ee12951d1d04db6d21bebcaed /storage/connect/odbconn.cpp
parent07674e6a741a82d2e30f9798f699209a6c34dfef (diff)
parentec8882b9ddbba2f9fc3571a1ac2ade0dabf412d9 (diff)
downloadmariadb-git-6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea.tar.gz
Merge branch '10.5' into 10.6
Diffstat (limited to 'storage/connect/odbconn.cpp')
-rw-r--r--storage/connect/odbconn.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 92f18aec348..c7843dfe245 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -11,7 +11,7 @@
/***********************************************************************/
#include <my_global.h>
#include <m_string.h>
-#if defined(__WIN__)
+#if defined(_WIN32)
//nclude <io.h>
//nclude <fcntl.h>
#include <direct.h> // for getcwd
@@ -45,13 +45,13 @@
#include "osutil.h"
-#if defined(__WIN__)
+#if defined(_WIN32)
/***********************************************************************/
/* For dynamic load of ODBC32.DLL */
/***********************************************************************/
#pragma comment(lib, "odbc32.lib")
extern "C" HINSTANCE s_hModule; // Saved module handle
-#endif // __WIN__
+#endif // _WIN32
TYPCONV GetTypeConv();
int GetConvSize();
@@ -1283,15 +1283,15 @@ bool ODBConn::DriverConnect(DWORD Options)
SWORD nResult;
PUCHAR ConnOut = (PUCHAR)PlugSubAlloc(m_G, NULL, MAX_CONNECT_LEN);
UWORD wConnectOption = SQL_DRIVER_COMPLETE;
-#if defined(__WIN__)
+#if defined(_WIN32)
HWND hWndTop = GetForegroundWindow();
HWND hWnd = GetParent(hWndTop);
if (hWnd == NULL)
hWnd = GetDesktopWindow();
-#else // !__WIN__
+#else // !_WIN32
HWND hWnd = (HWND)1;
-#endif // !__WIN__
+#endif // !_WIN32
wConnectOption = SQL_DRIVER_NOPROMPT;
//else if (Options & forceOdbcDialog)
@@ -1301,10 +1301,10 @@ bool ODBConn::DriverConnect(DWORD Options)
SQL_NTS, ConnOut, MAX_CONNECT_LEN,
&nResult, wConnectOption);
-#if defined(__WIN__)
+#if defined(_WIN32)
if (hWndTop)
EnableWindow(hWndTop, true);
-#endif // __WIN__
+#endif // _WIN32
// If user hit 'Cancel'
if (rc == SQL_NO_DATA_FOUND) {