Topics

[PATCH 23/30] Conflation manager fixes for windows


Michael Schonberg <mschonberg@...>
 

The callbacks need to be MAMACALLTYPE (__stdcall) and include port.h
rather than using #ifdef WIN32

Signed-off-by: Mike Schonberg <mschonberg@...>
---
mama/c_cpp/src/c/conflation/manager.c | 7 ++-----
mama/c_cpp/src/c/mama/conflation/manager.h | 16 ++++------------
2 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/mama/c_cpp/src/c/conflation/manager.c b/mama/c_cpp/src/c/conflation/manager.c
index e3cf42f..d596c29 100644
--- a/mama/c_cpp/src/c/conflation/manager.c
+++ b/mama/c_cpp/src/c/conflation/manager.c
@@ -343,11 +343,8 @@ mamaConflationManager_publish (mamaConflationManager mgr,

}

-#ifndef WIN32
-static void
-#else
-static void __stdcall
-#endif
+
+static void MAMACALLTYPE
flushCallback (wombatQueue queue, void* data, void* itemClosure, void* closure)
{
mamaConflationManager mgr = (mamaConflationManager)closure;
diff --git a/mama/c_cpp/src/c/mama/conflation/manager.h b/mama/c_cpp/src/c/mama/conflation/manager.h
index def3e1d..f5dcf45 100644
--- a/mama/c_cpp/src/c/mama/conflation/manager.h
+++ b/mama/c_cpp/src/c/mama/conflation/manager.h
@@ -24,9 +24,7 @@
#define CONFLATION_MANAGER_H__

#include <string.h>
-#ifdef WIN32
-#include <wombat/wincompat.h>
-#endif
+#include "port.h"

#include "mama/mama.h"

@@ -34,15 +32,9 @@
extern "C" {
#endif

-#ifndef WIN32
-typedef void (*mamaConflationEnqueueCallback)(mamaMsg msg,
- const char* topic,
- void* closure);
-#else
-typedef void (__stdcall *mamaConflationEnqueueCallback)(mamaMsg msg,
- const char* topic,
- void* closure);
-#endif
+typedef void (MAMACALLTYPE *mamaConflationEnqueueCallback)(mamaMsg msg,
+ const char* topic,
+ void* closure);

mama_status
mamaConflationManager_allocate (mamaConflationManager* mgr);
--
1.7.7.6