Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow gcc cross-compiling targetting windows, which does not like exported symbols...
[simgrid.git] / src / surf / surf.c
index 637ebf2..83bfde3 100644 (file)
@@ -125,15 +125,7 @@ const char *surf_action_state_names[6] = {
   "SURF_ACTION_NOT_IN_THE_SYSTEM"
 };
 
-int surf_network_model_description_size = 3
-#ifdef HAVE_GTNETS
-    + 1
-#endif
-#ifdef HAVE_SDP
-    + 1
-#endif
-    ;
-s_surf_model_description_t surf_network_model_description[] = {
+s_surf_model_description_t surf_network_model_description[surf_network_model_description_size] = {
   {"CM02", NULL, surf_network_model_init_CM02},
 #ifdef HAVE_GTNETS
   {"GTNets", NULL, surf_network_model_init_GTNETS},
@@ -145,17 +137,14 @@ s_surf_model_description_t surf_network_model_description[] = {
   {"Vegas", NULL, surf_network_model_init_Vegas}
 };
 
-int surf_cpu_model_description_size = 1;
-s_surf_model_description_t surf_cpu_model_description[] = {
+s_surf_model_description_t surf_cpu_model_description[surf_cpu_model_description_size] = {
   {"Cas01", NULL, surf_cpu_model_init_Cas01},
 };
 
-int surf_workstation_model_description_size = 4;
-s_surf_model_description_t surf_workstation_model_description[] = {
-  {"CLM03", NULL, surf_workstation_model_init_CLM03},
-  {"KCCFLN05", NULL, surf_workstation_model_init_KCCFLN05},
-  {"compound", NULL, surf_workstation_model_init_compound},
-  {"ptask_L07", NULL, surf_workstation_model_init_ptask_L07}
+s_surf_model_description_t surf_workstation_model_description[surf_workstation_model_description_size] = {
+  {"CLM03", NULL, surf_workstation_model_init_CLM03, create_workstations},
+  {"compound", NULL, surf_workstation_model_init_compound, NULL},
+  {"ptask_L07", NULL, surf_workstation_model_init_ptask_L07, NULL}
 };
 
 void update_model_description(s_surf_model_description_t * table,
@@ -379,7 +368,11 @@ FILE *surf_fopen(const char *name, const char *mode)
        path_name_len = strlen(path) + strlen(name) + 1;        /* plus '/' */
        path_name = xbt_realloc(path_name, path_name_len + 1);
       }
+      #ifdef WIN32
+      sprintf(path_name, "%s\\%s", path, name);
+      #else
       sprintf(path_name, "%s/%s", path, name);
+      #endif
       file = fopen(path_name, mode);
       if (file)
        return file;