From c9fdd77bc84fa871b0db681f3731a28a16947531 Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Tue, 24 Nov 2009 12:30:24 -0800 Subject: [PATCH] probe exported symbols Signed-off-by: Love Hornquist Astrand --- cf/make-proto.pl | 13 ++++++++++--- cf/win32.m4 | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cf/make-proto.pl b/cf/make-proto.pl index 02e407e15..12c6d07f5 100644 --- a/cf/make-proto.pl +++ b/cf/make-proto.pl @@ -316,26 +316,33 @@ extern \"C\" { } if ($opt_E) { $public_h_header .= "#ifndef $opt_E +#ifndef ${opt_E}_FUNCTION #if defined(_WIN32) -#define ${opt_E}_FUNCTION __stdcall __declspec(dllimport) +#define ${opt_E}_FUNCTION __declspec(dllimport) +#define ${opt_E}_CALL __stdcall #define ${opt_E}_VARIABLE __declspec(dllimport) #else #define ${opt_E}_FUNCTION +#define ${opt_E}_CALL #define ${opt_E}_VARIABLE #endif #endif - +#endif "; $private_h_header .= "#ifndef $opt_E +#ifndef ${opt_E}_FUNCTION #if defined(_WIN32) -#define ${opt_E}_FUNCTION __stdcall __declspec(dllimport) +#define ${opt_E}_FUNCTION __declspec(dllimport) +#define ${opt_E}_CALL __stdcall #define ${opt_E}_VARIABLE __declspec(dllimport) #else #define ${opt_E}_FUNCTION +#define ${opt_E}_CALL #define ${opt_E}_VARIABLE #endif #endif +#endif "; } diff --git a/cf/win32.m4 b/cf/win32.m4 index 9954ec3ca..5561ad966 100644 --- a/cf/win32.m4 +++ b/cf/win32.m4 @@ -3,10 +3,12 @@ dnl rk_WIN32_EXPORT buildsymbol symbol-that-export AC_DEFUN([rk_WIN32_EXPORT],[AH_TOP([#ifdef $1 #ifndef $2 #ifdef _WIN32_ -#define $2_FUNCTION __declspec(dllexport) __stdcall +#define $2_FUNCTION __declspec(dllexport) +#define $2_CALL __stdcall #define $2_VARIABLE __declspec(dllexport) #else #define $2_FUNCTION +#define $2_CALL #define $2_VARIABLE #endif #endif