summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2019-12-03 19:20:26 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2019-12-03 19:20:26 +0100
commit817675459ace163a4cbffa7eeab06670f2942da3 (patch)
tree39d2aab4e76fffe0cb3323fb4d2e6f59491d5a96 /storage/connect
parent579d572d25f75d51e9ac779d8dfed5da3600b7c3 (diff)
downloadmariadb-git-817675459ace163a4cbffa7eeab06670f2942da3.tar.gz
Fix tabrest.cpp when used for OEM
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/tabrest.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp
index 7e0d736f4e7..4f12caad52e 100644
--- a/storage/connect/tabrest.cpp
+++ b/storage/connect/tabrest.cpp
@@ -1,5 +1,5 @@
-/*************** Rest C++ Program Source Code File (.CPP) **************/
-/* PROGRAM NAME: Rest Version 1.6 */
+/************** tabrest C++ Program Source Code File (.CPP) ************/
+/* PROGRAM NAME: tabrest Version 1.7 */
/* (C) Copyright to the author Olivier BERTRAND 2018 - 2019 */
/* This program is the REST Web API support for MariaDB. */
/* When compiled without MARIADB defined, it is the EOM module code. */
@@ -13,12 +13,14 @@
#else // !MARIADB OEM module
#include "mini-global.h"
#define _MAX_PATH 260
-#if !defined(__WIN__)
-#define __stdcall
#if !defined(REST_SOURCE)
+#if defined(__WIN__) || defined(_WINDOWS)
+#include <windows.h>
+#else // !__WIN__
+#define __stdcall
#include <dlfcn.h> // dlopen(), dlclose(), dlsym() ...
-#endif
#endif // !__WIN__
+#endif // !REST_SOURCE
#define _OS_H_INCLUDED // Prevent os.h to be called
#endif // !MARIADB
@@ -26,7 +28,6 @@
/* Include application header files: */
/* global.h is header containing all global declarations. */
/* plgdbsem.h is header containing the DB application declarations. */
-/* (x)table.h is header containing the TDBASE declarations. */
/***********************************************************************/
#include "global.h"
#include "plgdbsem.h"
@@ -76,11 +77,11 @@ XGETREST GetRestFunction(PGLOBAL g)
if (getRestFnc)
return getRestFnc;
-#if !defined(REST_SOURCE)
+#if !defined(MARIADB) || !defined(REST_SOURCE)
if (trace(515))
htrc("Looking for GetRest library\n");
-#if defined(__WIN__)
+#if defined(__WIN__) || defined(_WINDOWS)
HANDLE Hdll;
const char* soname = "GetRest.dll"; // Module name