From: Mike Schonberg <mschonberg@nyx.com>
Moved #includes outside of #extern "C" in types.h to avoid issues on Windows
where standard headers may contain C++ templates.
Include port.h from middleware.c.
Signed-off-by: Mike Schonberg <mschonberg@nyx.com>
---
mama/c_cpp/src/c/mama/types.h | 9 +++++----
mama/c_cpp/src/c/middleware.c | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/mama/c_cpp/src/c/mama/types.h b/mama/c_cpp/src/c/mama/types.h
index d26c206..e0227ff 100644
--- a/mama/c_cpp/src/c/mama/types.h
+++ b/mama/c_cpp/src/c/mama/types.h
@@ -22,15 +22,14 @@
#ifndef MamaTypesH__
#define MamaTypesH__
-#if defined(__cplusplus)
-extern "C" {
-#endif
#include "wombat/port.h"
#include <stdlib.h>
#include <string.h>
-#define MAMA_QUANTITY_EPSILON ((mama_f64_t)0.00000000001)
+#if defined(__cplusplus)
+extern "C" {
+#endif
typedef int8_t mama_i8_t;
typedef uint8_t mama_u8_t;
@@ -48,6 +47,8 @@ typedef uint16_t mama_fid_t;
typedef size_t mama_size_t;
typedef uint32_t mama_seqnum_t;
+#define MAMA_QUANTITY_EPSILON ((mama_f64_t)0.00000000001)
+
/**
* Macro to determine if a quantity is zero
*/
diff --git a/mama/c_cpp/src/c/middleware.c b/mama/c_cpp/src/c/middleware.c
index ce80c4f..ad288ad 100644
--- a/mama/c_cpp/src/c/middleware.c
+++ b/mama/c_cpp/src/c/middleware.c
@@ -19,6 +19,7 @@
* 02110-1301 USA
*/
+#include "wombat/port.h"
#include <mama/middleware.h>
#include <string.h>
--
1.7.7.6