From a76911504e7585b831b889099ed10fd226a82491 Mon Sep 17 00:00:00 2001 From: mquinson Date: Sat, 27 Oct 2007 09:07:26 +0000 Subject: [PATCH] Factorize the current_property_set symbol of simix (for process properties) and surf (for host and link properties); mark it 'extern' in include/surf/surf.h, and declare it strongly (ie, initialize it) in surf/surfxml_parse.c so that the poor macosx linker don't get fooled git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4899 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/include/surf/surf.h | 1 + src/simix/private.h | 2 -- src/surf/surf_private.h | 2 -- src/surf/surfxml_parse.c | 2 ++ 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 5c7e5634cd..851f33daf7 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -545,6 +545,7 @@ XBT_PUBLIC(double)surf_get_clock(void); XBT_PUBLIC(void) surf_exit(void); /* Prototypes of the functions that handle the properties */ +XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */ void parse_properties(void); void free_string(void*); diff --git a/src/simix/private.h b/src/simix/private.h index 0b119fb842..8a31f69d8d 100644 --- a/src/simix/private.h +++ b/src/simix/private.h @@ -125,6 +125,4 @@ void __SIMIX_cond_wait(smx_cond_t cond); void __SIMIX_cond_display_actions(smx_cond_t cond); void __SIMIX_action_display_conditions(smx_action_t action); -xbt_dict_t current_property_set; - #endif diff --git a/src/surf/surf_private.h b/src/surf/surf_private.h index a2c6654701..daa9be1cf4 100644 --- a/src/surf/surf_private.h +++ b/src/surf/surf_private.h @@ -17,8 +17,6 @@ #define NO_MAX_DURATION -1.0 #define SG_TCP_CTE_GAMMA 20000.0 -xbt_dict_t current_property_set; - extern const char *surf_action_state_names[6]; typedef enum { diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 31e3397cd4..d839e25b74 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -36,6 +36,8 @@ xbt_dynar_t ETag_surfxml_argument_cb_list = NULL; xbt_dynar_t STag_surfxml_prop_cb_list = NULL; xbt_dynar_t ETag_surfxml_prop_cb_list = NULL; +xbt_dict_t current_property_set = NULL; + static xbt_dynar_t surf_input_buffer_stack = NULL; static xbt_dynar_t surf_file_to_parse_stack = NULL; -- 2.20.1