From: mquinson Date: Thu, 4 Oct 2007 14:22:11 +0000 (+0000) Subject: fight against multiple 'extern' specification X-Git-Tag: v3.3~1004 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ccf56140eb0b973a50ce9a981fa3e38667748495?ds=sidebyside fight against multiple 'extern' specification git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4787 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 6dacb0ff37..9a0e7284e5 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -307,12 +307,12 @@ typedef struct { /* 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 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 diff --git a/include/xbt/log.h b/include/xbt/log.h index e06fdf380d..6b7714885f 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -343,7 +343,7 @@ XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category, 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); diff --git a/src/gras/Virtu/rl_process.c b/src/gras/Virtu/rl_process.c index f5bb0efb40..4f542afe29 100644 --- a/src/gras/Virtu/rl_process.c +++ b/src/gras/Virtu/rl_process.c @@ -13,7 +13,7 @@ /* 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); diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index d81c773ec4..4b698aad8b 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -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); -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 */ -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 */ @@ -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 */ -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 @@ -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); -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 */ -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 diff --git a/src/xbt/ex.c b/src/xbt/ex.c index 8abd459981..adfc14ac21 100644 --- a/src/xbt/ex.c +++ b/src/xbt/ex.c @@ -366,8 +366,8 @@ void __xbt_ex_terminate_default(xbt_ex_t *e) { } /* 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) { diff --git a/src/xbt/log.c b/src/xbt/log.c index ca8af458d8..d2a7b97449 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -481,12 +481,7 @@ const char *xbt_log_priority_names[8] = { "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