Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fight against multiple 'extern' specification
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 14:22:11 +0000 (14:22 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 14:22:11 +0000 (14:22 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4787 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/ex.h
include/xbt/log.h
src/gras/Virtu/rl_process.c
src/include/surf/surf.h
src/xbt/ex.c
src/xbt/log.c

index 6dacb0f..9a0e728 100644 (file)
@@ -307,12 +307,12 @@ typedef struct {
 
 /* the exception context */
 typedef ex_ctx_t *(*ex_ctx_cb_t)(void);
 
 /* the exception context */
 typedef ex_ctx_t *(*ex_ctx_cb_t)(void);
-extern XBT_PUBLIC_DATA(ex_ctx_cb_t) __xbt_ex_ctx;
+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_ctx_t *__xbt_ex_ctx_default(void);
 
 /* the termination handler */
 typedef void (*ex_term_cb_t)(xbt_ex_t *);
-extern XBT_PUBLIC_DATA(ex_term_cb_t) __xbt_ex_terminate;
+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 
 extern void __xbt_ex_terminate_default(xbt_ex_t *e);
 
 /** @brief Introduce a block where exception may be dealed with 
index e06fdf3..6b77148 100644 (file)
@@ -343,7 +343,7 @@ XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t   category,
                                  e_xbt_log_priority_t priority);
 
 
                                  e_xbt_log_priority_t priority);
 
 
-extern XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
+XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
 
 XBT_LOG_EXTERNAL_CATEGORY(GRAS);
 
 
 XBT_LOG_EXTERNAL_CATEGORY(GRAS);
 
index f5bb0ef..4f542af 100644 (file)
@@ -13,7 +13,7 @@
 
 /* globals */
 static gras_procdata_t *_gras_procdata = NULL;
 
 /* globals */
 static gras_procdata_t *_gras_procdata = NULL;
-XBT_PUBLIC_DATA(char const *) _gras_procname = NULL;
+XBT_EXPORT_NO_IMPORT(char const *) _gras_procname = NULL;
 
 void gras_process_init() {
   _gras_procdata=xbt_new0(gras_procdata_t,1);
 
 void gras_process_init() {
   _gras_procdata=xbt_new0(gras_procdata_t,1);
index d81c773..4b698aa 100644 (file)
@@ -241,11 +241,11 @@ XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model;
  */
 XBT_PUBLIC(void) surf_cpu_model_init_Cas01(const char *filename);
 
  */
 XBT_PUBLIC(void) surf_cpu_model_init_Cas01(const char *filename);
 
-extern XBT_PUBLIC_DATA(int) surf_cpu_model_description_size;
+XBT_PUBLIC_DATA(int) surf_cpu_model_description_size;
 /** \brief The list of all available cpu model models
  *  \ingroup SURF_models
  */
 /** \brief The list of all available cpu model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
 
 /* Network model */
 
 
 /* Network model */
 
@@ -360,11 +360,11 @@ XBT_PUBLIC(void) surf_network_model_init_SDP(const char *filename);
 
 
 
 
 
 
-extern XBT_PUBLIC_DATA(int) surf_network_model_description_size;
+XBT_PUBLIC_DATA(int) surf_network_model_description_size;
 /** \brief The list of all available network model models
  *  \ingroup SURF_models
  */
 /** \brief The list of all available network model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[];
 
 /** \brief Workstation model extension public
  *  \ingroup SURF_models
 
 /** \brief Workstation model extension public
  *  \ingroup SURF_models
@@ -463,11 +463,11 @@ XBT_PUBLIC(void) surf_workstation_model_init_KCCFLN05(const char *filename);
  */
 XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(const char *filename);
 
  */
 XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(const char *filename);
 
-extern XBT_PUBLIC_DATA(int) surf_workstation_model_description_size;
+XBT_PUBLIC_DATA(int) surf_workstation_model_description_size;
 /** \brief The list of all available workstation model models
  *  \ingroup SURF_models
  */
 /** \brief The list of all available workstation model models
  *  \ingroup SURF_models
  */
-extern XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_description[];
+XBT_PUBLIC_DATA(s_surf_model_description_t) surf_workstation_model_description[];
 
 /** \brief The network links
  *  \ingroup SURF_models
 
 /** \brief The network links
  *  \ingroup SURF_models
index 8abd459..adfc14a 100644 (file)
@@ -366,8 +366,8 @@ void __xbt_ex_terminate_default(xbt_ex_t *e)  {
 }
 
 /* the externally visible API */
 }
 
 /* the externally visible API */
-XBT_PUBLIC_DATA(ex_ctx_cb_t)  __xbt_ex_ctx       = &__xbt_ex_ctx_default;
-XBT_PUBLIC_DATA(ex_term_cb_t) __xbt_ex_terminate = &__xbt_ex_terminate_default;
+XBT_EXPORT_NO_IMPORT(ex_ctx_cb_t)  __xbt_ex_ctx       = &__xbt_ex_ctx_default;
+XBT_EXPORT_NO_IMPORT(ex_term_cb_t) __xbt_ex_terminate = &__xbt_ex_terminate_default;
 
 
 void xbt_ex_free(xbt_ex_t e) {
 
 
 void xbt_ex_free(xbt_ex_t e) {
index ca8af45..d2a7b97 100644 (file)
@@ -481,12 +481,7 @@ const char *xbt_log_priority_names[8] = {
   "CRITICAL"
 };
 
   "CRITICAL"
 };
 
-#ifndef _MSC_VER
-XBT_PUBLIC_DATA(s_xbt_log_category_t)
-#else
-s_xbt_log_category_t
-#endif  
-_XBT_LOGV(XBT_LOG_ROOT_CAT) = {
+s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT) = {
   0, 0, 0,
   "root", xbt_log_priority_uninitialized, 0,
   NULL, 0
   0, 0, 0,
   "root", xbt_log_priority_uninitialized, 0,
   NULL, 0