Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Integrate Bruno's work on SIMIX onto main stream. Tests are broken, but it looks...
[simgrid.git] / tools / gras / stub_generator.c
index 8f05f00..1e66655 100644 (file)
@@ -432,14 +432,17 @@ static void generate_sim(char *project)
        fprintf(OUT,
 #ifdef USE_SIMIX               
        "  gras_create_environment(argv[1]);\n" 
+       "\n" 
+       "  /*  Application deployment */\n"
+       );
 #else          
        "  MSG_paje_output(\"%s.trace\");\n" 
        "  MSG_set_channel_number(XBT_MAX_CHANNEL); /* Using at most 10 channel (ports) per host. Change it here if needed */\n" 
        "  MSG_create_environment(argv[1]);\n"
-#endif         
        "\n" 
        "  /*  Application deployment */\n",
        project);
+#endif         
        xbt_dict_foreach(process_function_set,cursor,key,data) {
 #ifdef USE_SIMIX          
                fprintf(OUT,"  gras_function_register(\"%s\", launch_%s);\n",key,key);
@@ -480,7 +483,7 @@ static void generate_rl(char *project)
                  "#include <signal.h>\n" \
                  "#include <gras.h>\n" \
                  "\n" \
-                 "extern const char * XBT_PUBLIC_DATA _gras_procname;\n" \
+                 "XBT_PUBLIC_DATA(const char *) _gras_procname;\n" \
                  "/* user code */\n" \
                  "int %s(int argc, char *argv[]);\n" \
                  "\n" \