Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a new macro XBT_DECLARE_DATA for special data exportation
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Mar 2007 12:05:09 +0000 (12:05 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 13 Mar 2007 12:05:09 +0000 (12:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3250 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/misc.h

index 51e23cf..cbfd518 100644 (file)
 
 
 /* Build the DLL */
 
 
 /* Build the DLL */
-#if defined(DLL_EXPORT) 
+#if defined(DLL_EXPORT)
 #  define XBT_PUBLIC(type)            __declspec(dllexport) type
 #  define XBT_EXPORT_NO_IMPORT(type)  __declspec(dllexport) type
 #  define XBT_IMPORT_NO_EXPORT(type)  type 
 #  define XBT_PUBLIC(type)            __declspec(dllexport) type
 #  define XBT_EXPORT_NO_IMPORT(type)  __declspec(dllexport) type
 #  define XBT_IMPORT_NO_EXPORT(type)  type 
+#  define XBT_DECLARE_DATA                       __declspec(dllexport)                         
 
 /* Pack everything up statically */
 
 /* Pack everything up statically */
-#elif defined(DLL_STATIC) 
+#elif defined(DLL_STATIC)
 #  define XBT_PUBLIC(type)            type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_PUBLIC(type)            type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  type 
+#  define XBT_IMPORT_NO_EXPORT(type)  type
+#  define XBT_DECLARE_DATA 
 
 /* Link against the DLL */
 
 /* Link against the DLL */
-#elif defined(_WIN32) 
+#elif (defined(_WIN32) && !defined(DLL_EXPORT))
 #  define XBT_PUBLIC(type)            __declspec(dllimport) type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  __declspec(dllimport) type
 #  define XBT_PUBLIC(type)            __declspec(dllimport) type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  __declspec(dllimport) type
+#  define XBT_DECLARE_DATA                       __declspec(dllimport) 
 
 /* Non-UNIX build. Let's keep sain here ;) */
 
 /* Non-UNIX build. Let's keep sain here ;) */
-#else 
+#else
 #  define XBT_PUBLIC(type)            extern type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  type
 #  define XBT_PUBLIC(type)            extern type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  type
+#  define XBT_DECLARE_DATA
 #endif
    
 
 
 
 #ifndef max
 #endif
    
 
 
 
 #ifndef max
-#  define max(a, b) (((a) > (b))?(a):(b))
+#  define max(a,b)     (((a) > (b)) ? (a) : (b))
 #endif
 #ifndef min
 #endif
 #ifndef min
-#  define min(a, b) (((a) < (b))?(a):(b))
+#  define min(a,b)     (((a) < (b)) ? (a) : (b))
 #endif
 
 #define TRUE  1
 #endif
 
 #define TRUE  1