Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve compilation time by epsilon by sharpening the includes (str.h loads dynar...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 20 Dec 2007 07:42:18 +0000 (07:42 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 20 Dec 2007 07:42:18 +0000 (07:42 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5140 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/sysdep.h
src/simdag/sd_global.c
src/simix/smx_global.c
src/surf/cpu_private.h
src/surf/surfxml_parse.c
src/surf/trace_mgr.c
src/surf/workstation_ptask_L07.c
src/xbt/ex.c
src/xbt/log.c
src/xbt/xbt_str.c
src/xbt_str_unit.c

index a2271ab..8faa0da 100644 (file)
@@ -17,7 +17,6 @@
    
 #include "xbt/misc.h"
 #include "xbt/asserts.h"
    
 #include "xbt/misc.h"
 #include "xbt/asserts.h"
-#include "xbt/str.h"
   
 SG_BEGIN_DECL()
 
   
 SG_BEGIN_DECL()
 
@@ -32,6 +31,12 @@ XBT_PUBLIC(void) xbt_abort(void) _XBT_GNUC_NORETURN;
 XBT_PUBLIC(void) xbt_die(const char *msg) _XBT_GNUC_NORETURN;
 /** @} */
 
 XBT_PUBLIC(void) xbt_die(const char *msg) _XBT_GNUC_NORETURN;
 /** @} */
 
+/* these ones live in str.h, but redeclare them here so that we do 
+   not need to load the whole str.h and its heavy dependencies */
+XBT_PUBLIC(int) asprintf  (char **ptr, const char *fmt, /*args*/ ...) _XBT_GNUC_PRINTF(2,3);
+XBT_PUBLIC(int) vasprintf (char **ptr, const char *fmt, va_list ap);
+XBT_PUBLIC(char*) bprintf   (const char*fmt, ...) _XBT_GNUC_PRINTF(1,2);
+
 /** @addtogroup XBT_syscall
  *  @brief Malloc and associated functions, killing the program on error (with \ref XBT_ex)
  *
 /** @addtogroup XBT_syscall
  *  @brief Malloc and associated functions, killing the program on error (with \ref XBT_ex)
  *
index df22d65..ee029e0 100644 (file)
@@ -4,6 +4,7 @@
 #include "surf/surf.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 #include "surf/surf.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
+#include "xbt/str.h"
 #include "xbt/config.h"
 
 XBT_LOG_NEW_CATEGORY(sd,"Logging specific to SimDag");
 #include "xbt/config.h"
 
 XBT_LOG_NEW_CATEGORY(sd,"Logging specific to SimDag");
index c204eca..192a816 100644 (file)
@@ -9,6 +9,7 @@
 #include "private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "private.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
+#include "xbt/str.h"
 #include "xbt/ex.h"            /* ex_backtrace_display */
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix,
                                "Logging specific to SIMIX (kernel)");
 #include "xbt/ex.h"            /* ex_backtrace_display */
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix,
                                "Logging specific to SIMIX (kernel)");
index 63017a4..0e91cb5 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "surf_private.h"
 #include "xbt/dict.h"
 
 #include "surf_private.h"
 #include "xbt/dict.h"
+#include "xbt/str.h"
 
 typedef struct surf_action_cpu_Cas01 {
   s_surf_action_t generic_action;
 
 typedef struct surf_action_cpu_Cas01 {
   s_surf_action_t generic_action;
index 736792a..008d394 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "xbt/misc.h"
 #include "xbt/log.h"
 
 #include "xbt/misc.h"
 #include "xbt/log.h"
+#include "xbt/str.h"
 #include "xbt/dict.h"
 #include "surf/surfxml_parse_private.h"
 #include "surf/surf_private.h"
 #include "xbt/dict.h"
 #include "surf/surfxml_parse_private.h"
 #include "surf/surf_private.h"
index 65a9259..1f53504 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
+#include "xbt/str.h"
 #include "xbt/dict.h"
 #include "trace_mgr_private.h"
 #include "surf_private.h"
 #include "xbt/dict.h"
 #include "trace_mgr_private.h"
 #include "surf_private.h"
index d708a9e..2298b43 100644 (file)
@@ -6,6 +6,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/ex.h"
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/ex.h"
+#include "xbt/str.h"
 #include "xbt/dict.h"
 #include "surf_private.h"
 /* extern lmm_system_t maxmin_system; */
 #include "xbt/dict.h"
 #include "surf_private.h"
 /* extern lmm_system_t maxmin_system; */
index c331605..428080b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "portable.h" /* execinfo when available */
 #include "xbt/ex.h"
 
 #include "portable.h" /* execinfo when available */
 #include "xbt/ex.h"
+#include "xbt/str.h"
 #include "xbt/module.h" /* xbt_binary_name */
 #include "xbt/synchro.h" /* xbt_thread_self */
 
 #include "xbt/module.h" /* xbt_binary_name */
 #include "xbt/synchro.h" /* xbt_thread_self */
 
index 19e09b7..e80361a 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "xbt/misc.h"
 #include "xbt/ex.h"
 
 #include "xbt/misc.h"
 #include "xbt/ex.h"
+#include "xbt/str.h"
 #include "xbt/sysdep.h"
 #include "xbt/log_private.h"
 #include "xbt/dynar.h"
 #include "xbt/sysdep.h"
 #include "xbt/log_private.h"
 #include "xbt/dynar.h"
index 805adab..6e4739b 100644 (file)
@@ -383,6 +383,8 @@ xbt_dynar_t xbt_str_split_quoted(const char *s) {
 }
 
 #ifdef SIMGRID_TEST
 }
 
 #ifdef SIMGRID_TEST
+#include "xbt/str.h"
+
 #define mytest(name, input, expected) \
   xbt_test_add0(name); \
   d=xbt_str_split_quoted(input); \
 #define mytest(name, input, expected) \
   xbt_test_add0(name); \
   d=xbt_str_split_quoted(input); \
index ecf9026..71b2c57 100644 (file)
@@ -9,6 +9,8 @@
 /*******************************/
 
 # 387 "xbt/xbt_str.c" 
 /*******************************/
 
 # 387 "xbt/xbt_str.c" 
+#include "xbt/str.h"
+
 #define mytest(name, input, expected) \
   xbt_test_add0(name); \
   d=xbt_str_split_quoted(input); \
 #define mytest(name, input, expected) \
   xbt_test_add0(name); \
   d=xbt_str_split_quoted(input); \