From 579d572d25f75d51e9ac779d8dfed5da3600b7c3 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 3 Dec 2019 18:06:05 +0100 Subject: [PATCH] Make restGetFile extern C --- storage/connect/restget.cpp | 2 ++ storage/connect/tabrest.cpp | 6 +++--- storage/connect/tabrest.h | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/storage/connect/restget.cpp b/storage/connect/restget.cpp index d85ec6ae693..29dae230780 100644 --- a/storage/connect/restget.cpp +++ b/storage/connect/restget.cpp @@ -13,6 +13,8 @@ using namespace concurrency::streams; // Asynchronous streams typedef const char* PCSZ; +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); + /***********************************************************************/ /* Make a local copy of the requested file. */ /***********************************************************************/ diff --git a/storage/connect/tabrest.cpp b/storage/connect/tabrest.cpp index f6d21139ab0..7e0d736f4e7 100644 --- a/storage/connect/tabrest.cpp +++ b/storage/connect/tabrest.cpp @@ -15,9 +15,9 @@ #define _MAX_PATH 260 #if !defined(__WIN__) #define __stdcall -//#if !defined(REST_SOURCE) -//#include // dlopen(), dlclose(), dlsym() ... -//#endif +#if !defined(REST_SOURCE) +#include // dlopen(), dlclose(), dlsym() ... +#endif #endif // !__WIN__ #define _OS_H_INCLUDED // Prevent os.h to be called #endif // !MARIADB diff --git a/storage/connect/tabrest.h b/storage/connect/tabrest.h index d945c97e5f1..9cf2d10a6b8 100644 --- a/storage/connect/tabrest.h +++ b/storage/connect/tabrest.h @@ -18,7 +18,9 @@ typedef int(__stdcall* XGETREST) (char*, bool, PCSZ, PCSZ, PCSZ); /* Functions used by REST. */ /***********************************************************************/ XGETREST GetRestFunction(PGLOBAL g); -int restGetFile(char* m, bool x, PCSZ http, PCSZ uri, PCSZ fn); +#if defined(REST_SOURCE) +extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn); +#endif // REST_SOURCE #if defined(MARIADB) PQRYRES RESTColumns(PGLOBAL g, PTOS tp, char* tab, char* db, bool info); #endif // !MARIADB