[Mobies-commit] [commit] r4222 - UDM/trunk/include
endre at redhat3.isis.vanderbilt.edu
endre at redhat3.isis.vanderbilt.edu
Sat Dec 28 08:56:21 CST 2013
Author: endre
Date: Sat Dec 28 08:56:21 2013
New Revision: 4222
Log:
Linking issue on linux because of changes done to macro UDM_USE_DOM.
Now the macro has different definitions for Linux and MAC OS X
Modified:
UDM/trunk/include/UdmBase.h
Modified: UDM/trunk/include/UdmBase.h
==============================================================================
--- UDM/trunk/include/UdmBase.h Sat Dec 28 06:38:46 2013 (r4221)
+++ UDM/trunk/include/UdmBase.h Sat Dec 28 08:56:21 2013 (r4222)
@@ -4110,15 +4110,21 @@
//defines for using backends
#ifdef _WIN32
-#if !defined(UDM_DYNAMIC_LINKING)
-#define UDM_USE_DOM __pragma(comment(linker, "/include:?DummyFL at UdmDom@@3HA"))
-#define UDM_USE_MGA __pragma(comment(linker, "/include:?DummyFL at UdmGme@@3HA"))
-#else
-#define UDM_USE_DOM
-#define UDM_USE_MGA
-#endif
-#else
-#define UDM_USE_DOM namespace UdmDom{extern UDM_DLL int DummyFL;static int *Dummy_For_Linker = &DummyFL; struct _use_var{_use_var(){Dummy_For_Linker++;}} __unused;};
+ #if !defined(UDM_DYNAMIC_LINKING)
+ #define UDM_USE_DOM __pragma(comment(linker, "/include:?DummyFL at UdmDom@@3HA"))
+ #define UDM_USE_MGA __pragma(comment(linker, "/include:?DummyFL at UdmGme@@3HA"))
+ #else
+ #define UDM_USE_DOM
+ #define UDM_USE_MGA
+ #endif
+ #else
+ #if (defined(__MACH__) || defined(__APPLE__) )
+ //g++ on Mac considers this variable as static anyway
+ //TODO: remove completly this Macro on MAC OS X, we use full dynamic linking
+ #define UDM_USE_DOM namespace UdmDom{extern UDM_DLL int DummyFL;static int *Dummy_For_Linker = &DummyFL; struct _use_var{_use_var(){Dummy_For_Linker++;}} __unused;};
+ #else
+ #define UDM_USE_DOM namespace UdmDom{extern UDM_DLL int DummyFL;static int *Dummy_For_Linker = &DummyFL; static struct _use_var{_use_var(){Dummy_For_Linker++;}} __unused;};
+ #endif
#endif
More information about the Mobies-commit
mailing list