Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to do what is needed to export data in DLL during cross-compiles
[simgrid.git] / include / xbt / misc.h
index 4c01db9..9b232f3 100644 (file)
 # define _XBT_INLINE 
 #endif
 
+/* The cruft needed to export data in DLLs */
+#ifdef _WIN32
+# ifdef DLL_EXPORT 
+#  define XBT_EXPORT __declspec(dllexport) /* building the DLL */
+# else
+#  define XBT_EXPORT extern __declspec(dllimport) /* using the DLL */
+# endif
+#else
+# define XBT_EXPORT
+#endif
+
 
 
 #ifndef max
@@ -81,17 +92,6 @@ SG_BEGIN_DECL()
 
 const char *xbt_procname(void);
 
-
-/* Generic function type */
-
-   typedef void (void_f_ppvoid_t)(void**);
-   typedef void (void_f_pvoid_t) (void*);
-   typedef void (*void_f_void_t) (void);
-
-   typedef int  (int_f_pvoid_pvoid_t) (void*,void*);
-   
-   typedef int  (*int_f_void_t)   (void); /* FIXME: rename it to int_pf_void_t */
-
 #define XBT_BACKTRACE_SIZE 10 /* FIXME: better place? Do document */
    
 SG_END_DECL()