From: Martin Quinson Date: Tue, 23 Feb 2016 18:44:27 +0000 (+0100) Subject: reduce the amount of includes to speed up recompilations X-Git-Tag: v3_13~721 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/336a8849b0b57d576c5772a217ad13d0b8c9cc42?hp=42ec8c10a2de296855c36105a1d5baa08a8a0d0d reduce the amount of includes to speed up recompilations --- diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 81ef04e928..f8b1b886df 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -8,7 +8,6 @@ #include #include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */ #include "simgrid/simix.h" /* semaphores for the barrier */ -#include "xbt.h" /* calloc, printf */ #include /** @addtogroup MSG_examples diff --git a/examples/msg/exception/exception.c b/examples/msg/exception/exception.c index 18d5c1027f..3a11d2eadd 100644 --- a/examples/msg/exception/exception.c +++ b/examples/msg/exception/exception.c @@ -4,8 +4,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "xbt/log.h" #include "simgrid/msg.h" -#include "xbt.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test_exception, "Messages specific for this msg example"); diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 316a59a6c5..629feb6675 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -7,8 +7,6 @@ #ifndef SG_PLATF_TYPES_H #define SG_PLATF_TYPES_H -#include - #ifdef __cplusplus namespace simgrid { @@ -51,7 +49,7 @@ typedef surf_NetCard *sg_netcard_t; typedef surf_Resource *sg_resource_t; // Types which are in fact dictelmt: -typedef xbt_dictelm_t sg_storage_t; +typedef struct s_xbt_dictelm *sg_storage_t; typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */ diff --git a/include/simgrid/jedule/jedule_platform.h b/include/simgrid/jedule/jedule_platform.h index f74ddf6f49..cb1552d16e 100644 --- a/include/simgrid/jedule/jedule_platform.h +++ b/include/simgrid/jedule/jedule_platform.h @@ -10,7 +10,7 @@ #include "simgrid_config.h" #include "xbt/dynar.h" -#include "xbt/hash.h" +#include "xbt/dict.h" #ifdef HAVE_JEDULE diff --git a/include/xbt/hash.h b/include/xbt/hash.h index d66ec43e38..7bcea4f686 100644 --- a/include/xbt/hash.h +++ b/include/xbt/hash.h @@ -8,7 +8,8 @@ #ifndef XBT_HASH_H #define XBT_HASH_H -#include "xbt/str.h" + +#include "xbt/misc.h" SG_BEGIN_DECL() diff --git a/src/instr/jedule/jedule_platform.cpp b/src/instr/jedule/jedule_platform.cpp index b585d51d18..73beb15cc3 100644 --- a/src/instr/jedule/jedule_platform.cpp +++ b/src/instr/jedule/jedule_platform.cpp @@ -4,12 +4,14 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include -#include +#include "simgrid/jedule/jedule_platform.h" + #include "xbt/asserts.h" #include "xbt/dynar.h" +#include "xbt/str.h" -#include "simgrid/jedule/jedule_platform.h" +#include +#include #ifdef HAVE_JEDULE diff --git a/src/mc/mc_pair.cpp b/src/mc/mc_pair.cpp index 129e69ad5b..dcbff99685 100644 --- a/src/mc/mc_pair.cpp +++ b/src/mc/mc_pair.cpp @@ -4,7 +4,6 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include #include "src/mc/mc_liveness.h" #include "src/mc/mc_private.h" diff --git a/src/mc/mc_record.cpp b/src/mc/mc_record.cpp index 824466a682..4541cef903 100644 --- a/src/mc/mc_record.cpp +++ b/src/mc/mc_record.cpp @@ -8,8 +8,7 @@ #include #include -#include -#include +#include "simgrid/simix.h" #include "src/mc/mc_replay.h" #include "src/mc/mc_record.h" diff --git a/src/xbt/xbt_sha.c b/src/xbt/xbt_sha.c index d6223e2692..baa24c3256 100644 --- a/src/xbt/xbt_sha.c +++ b/src/xbt/xbt_sha.c @@ -15,6 +15,7 @@ #include "xbt/sysdep.h" #include "xbt/hash.h" +#include /* sprintf */ struct s_xbt_sha_ { unsigned int hash[5]; diff --git a/teshsuite/mc/dwarf/dwarf.cpp b/teshsuite/mc/dwarf/dwarf.cpp index 7e1a2e519d..83862c4c16 100644 --- a/teshsuite/mc/dwarf/dwarf.cpp +++ b/teshsuite/mc/dwarf/dwarf.cpp @@ -11,7 +11,6 @@ #include #include -#include #include #include "mc/datatypes.h"