Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Don't define variable "platform_filename" twice.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 18 May 2011 12:28:29 +0000 (14:28 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 18 May 2011 14:40:29 +0000 (16:40 +0200)
Declare it "extern" in include file, and define it elsewhere.
Found by compiling with "-fno-common".

include/surf/surfxml_parse.h
src/surf/surfxml_parse.c

index 6a284e7..079db3b 100644 (file)
 #include "xbt/function_types.h"
 #include "xbt/dict.h"
 
 #include "xbt/function_types.h"
 #include "xbt/dict.h"
 
-char * platform_filename;
-
 SG_BEGIN_DECL()
 
 SG_BEGIN_DECL()
 
+XBT_PUBLIC_DATA(char *) platform_filename;
+
 /* Hook for the different tags. All the functions which pointer to are push into here are run when the tag is encountered */
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_platform_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_platform_cb_list;
 /* Hook for the different tags. All the functions which pointer to are push into here are run when the tag is encountered */
 XBT_PUBLIC_DATA(xbt_dynar_t) STag_surfxml_platform_cb_list;
 XBT_PUBLIC_DATA(xbt_dynar_t) ETag_surfxml_platform_cb_list;
index af80730..9309801 100644 (file)
@@ -16,6 +16,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
 #undef CLEANUP
 #include "simgrid_dtd.c"
 
 #undef CLEANUP
 #include "simgrid_dtd.c"
 
+char *platform_filename;
+
 /* Initialize the parsing globals */
 xbt_dict_t traces_set_list = NULL;
 xbt_dict_t trace_connect_list_host_avail = NULL;
 /* Initialize the parsing globals */
 xbt_dict_t traces_set_list = NULL;
 xbt_dict_t trace_connect_list_host_avail = NULL;