probe exported symbols
authorAsanka Herath <asanka@secure-endpoints.com>
Tue, 24 Nov 2009 20:30:24 +0000 (12:30 -0800)
committerLove Hornquist Astrand <lha@h5l.org>
Tue, 24 Nov 2009 20:30:24 +0000 (12:30 -0800)
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
cf/make-proto.pl
cf/win32.m4

index 02e407e15774c8fd39f981ea51b99a2a8a242777..12c6d07f5e524e93e1d61abdd6bc737706845401 100644 (file)
@@ -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
 
 ";
 }
index 9954ec3cabb63475ebd0e881a9bcbad5e396982a..5561ad966f9ee2c75c31153012fe3dbde6aff9a0 100644 (file)
@@ -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