[PATCH 11/30] Moved macros for inline functions to _os_/port.h


Michael Schonberg <mschonberg@...>
 

These are compiler/os specific.

Signed-off-by: Mike Schonberg <mschonberg@nyx.com>
---
common/c_cpp/src/c/linux/port.h | 3 +++
common/c_cpp/src/c/wombat/wCommon.h | 27 ++-------------------------
2 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/common/c_cpp/src/c/linux/port.h b/common/c_cpp/src/c/linux/port.h
index f8b711c..00a1405 100644
--- a/common/c_cpp/src/c/linux/port.h
+++ b/common/c_cpp/src/c/linux/port.h
@@ -58,6 +58,9 @@ extern "C"
#define MAMAExpBridgeDLL
#define MAMACALLTYPE

+#define WCOMMONINLINE inline static
+#define WCOMMONFORCEINLINE inline static
+
/* Type for handle to dynamically loaded library */
typedef void* LIB_HANDLE;

diff --git a/common/c_cpp/src/c/wombat/wCommon.h b/common/c_cpp/src/c/wombat/wCommon.h
index 6b0752b..93c99d1 100644
--- a/common/c_cpp/src/c/wombat/wCommon.h
+++ b/common/c_cpp/src/c/wombat/wCommon.h
@@ -22,30 +22,7 @@
#ifndef _WOMBAT_WCOMMON_H
#define _WOMBAT_WCOMMON_H

-/* Inline function declarations are different on each platform, this define
- * provides the correct keyword.
- */
-#ifndef WCOMMONINLINE
-
-/* Windows */
-#ifdef WIN32
-
-#define WCOMMONINLINE __inline
-#define WCOMMONFORCEINLINE __forceinline
-
-/* Solaris */
-#elif __SUNPRO_C
-
-#define WCOMMONINLINE inline static
-#define WCOMMONFORCEINLINE inline static
-
-/* All other OS, assuming that GCC is supported. */
-#else
-#define WCOMMONINLINE inline static
-#define WCOMMONFORCEINLINE inline static
-
-#endif
-
-#endif
+/* Moved to _os_/port.h */
+#include "port.h"

#endif /* _WOMBAT_WCOMMON_H */
--
1.7.7.6