Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Export public data in a way where we can specify that they are extern C
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 4 Jun 2007 08:37:47 +0000 (08:37 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 4 Jun 2007 08:37:47 +0000 (08:37 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3547 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/ex.h
include/xbt/misc.h
src/gras/Virtu/rl_process.c
src/gras_simix/Virtu/gras_simix_rl_process.c

index 143a26e..9684a8c 100644 (file)
@@ -309,12 +309,12 @@ typedef struct {
 
 /* the exception context */
 typedef ex_ctx_t *(*ex_ctx_cb_t)(void);
-extern ex_ctx_cb_t XBT_PUBLIC_DATA __xbt_ex_ctx;
+extern XBT_PUBLIC_DATA(ex_ctx_cb_t) __xbt_ex_ctx;
 extern ex_ctx_t *__xbt_ex_ctx_default(void);
 
 /* the termination handler */
 typedef void (*ex_term_cb_t)(xbt_ex_t *);
-extern ex_term_cb_t XBT_PUBLIC_DATA __xbt_ex_terminate;
+extern XBT_PUBLIC_DATA(ex_term_cb_t) __xbt_ex_terminate;
 extern void __xbt_ex_terminate_default(xbt_ex_t *e);
 
 /** @brief Introduce a block where exception may be dealed with 
index 24ea9c6..6a5f341 100644 (file)
 #  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_DATA                       __declspec(dllexport)
+#  define XBT_PUBLIC_DATA(type)              __declspec(dllexport) type
 
 /* Pack everything up statically */
 #elif defined(DLL_STATIC)
 #  define XBT_PUBLIC(type)            type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA                
+#  define XBT_PUBLIC_DATA(type)       type
      
 
 /* Link against the DLL */
 #  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_DATA                              __declspec(dllimport)           
+#  define XBT_PUBLIC_DATA(type)                __declspec(dllimport) type
 
-/* Non-UNIX build. Let's keep sain here ;) */
+/* UNIX build. Let's keep sain here ;) */
 #else
 #  define XBT_PUBLIC(type)            extern type
 #  define XBT_EXPORT_NO_IMPORT(type)  type
 #  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA       
+#  define XBT_PUBLIC_DATA(type)       type
 #endif
    
 #if !defined (max) && !defined(__cplusplus)
index 7351f8a..d044831 100644 (file)
@@ -13,7 +13,7 @@
 
 /* globals */
 static gras_procdata_t *_gras_procdata = NULL;
-char const * XBT_PUBLIC_DATA _gras_procname = NULL;
+XBT_PUBLIC_DATA(char const *) _gras_procname = NULL;
 
 void gras_process_init() {
   _gras_procdata=xbt_new0(gras_procdata_t,1);
index 2c6329e..4799bf5 100644 (file)
@@ -13,7 +13,7 @@
 
 /* globals */
 static gras_procdata_t *_gras_procdata = NULL;
-char const * XBT_PUBLIC_DATA _gras_procname = NULL;
+XBT_PUBLIC_DATA(char const *) _gras_procname = NULL;
 
 void gras_process_init() {
   _gras_procdata=xbt_new0(gras_procdata_t,1);