From 975babad32bf69ffb339dc1d449cd85e111ba733 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 11 Oct 2012 16:10:14 +0200 Subject: [PATCH] Include standard header files after local includes. It should fix the build on Debian Lenny (oldstable). --- include/xbt/sysdep.h | 8 ++++---- src/include/surf/maxmin.h | 2 +- src/include/surf/random_mgr.h | 2 -- src/instr/jedule/jedule_sd_binding.c | 4 ++-- src/smpi/smpi_bench.c | 2 +- src/surf/random_mgr.c | 2 ++ src/surf/surf.c | 4 ++-- src/surf/surf_config.c | 1 + src/surf/surf_routing.c | 4 ++-- src/surf/surf_routing_generic.c | 4 ++-- src/xbt/xbt_rl_time.c | 4 ++-- testsuite/surf/maxmin_bench.c | 5 +++-- testsuite/surf/trace_usage.c | 8 +++++--- 13 files changed, 27 insertions(+), 23 deletions(-) diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index 4bc927c29d..536c12d9d1 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -11,16 +11,16 @@ #ifndef _XBT_SYSDEP_H #define _XBT_SYSDEP_H -#include -#include -#include /* va_list */ - #include "xbt/log.h" #include "xbt/misc.h" #include "xbt/asserts.h" #include "simgrid_config.h" +#include +#include +#include /* va_list */ + SG_BEGIN_DECL() /* They live in asserts.h, but need to be declared before this module. diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index ba06c74030..9fd51c0725 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -7,10 +7,10 @@ #ifndef _SURF_MAXMIN_H #define _SURF_MAXMIN_H -#include #include "portable.h" #include "xbt/misc.h" #include "surf/datatypes.h" +#include extern double sg_maxmin_precision; #define MAXMIN_PRECISION sg_maxmin_precision diff --git a/src/include/surf/random_mgr.h b/src/include/surf/random_mgr.h index 3580ab4738..ec942d3314 100644 --- a/src/include/surf/random_mgr.h +++ b/src/include/surf/random_mgr.h @@ -9,8 +9,6 @@ #include "xbt/heap.h" #include "xbt/dict.h" -#include -#include SG_BEGIN_DECL() diff --git a/src/instr/jedule/jedule_sd_binding.c b/src/instr/jedule/jedule_sd_binding.c index dd3f43356a..a58226e736 100644 --- a/src/instr/jedule/jedule_sd_binding.c +++ b/src/instr/jedule/jedule_sd_binding.c @@ -6,8 +6,6 @@ */ -#include - #include "xbt/asserts.h" #include "xbt/dynar.h" @@ -20,6 +18,8 @@ #include "instr/jedule/jedule_platform.h" #include "instr/jedule/jedule_output.h" +#include + #ifdef HAVE_JEDULE XBT_LOG_NEW_CATEGORY(jedule, "Logging specific to Jedule"); diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index c3628c8dc1..f3926a7758 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -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 // sqrt #include "private.h" #include "xbt/dict.h" #include "xbt/sysdep.h" @@ -16,6 +15,7 @@ #include #include #include +#include // sqrt #include #include #include diff --git a/src/surf/random_mgr.c b/src/surf/random_mgr.c index 90326e674b..d87ce7b527 100644 --- a/src/surf/random_mgr.c +++ b/src/surf/random_mgr.c @@ -7,6 +7,8 @@ #include "surf/random_mgr.h" #include "xbt/sysdep.h" #include "gras_config.h" /*_XBT_WIN32*/ +#include +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(random, surf, "Random part of surf"); diff --git a/src/surf/surf.c b/src/surf/surf.c index 19e441e82a..5fb7317eaa 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -4,8 +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 "surf_private.h" #include "xbt/module.h" #include "mc/mc.h" @@ -13,6 +11,8 @@ #include "surf/surf_resource.h" #include "xbt/xbt_os_thread.h" +#include + XBT_LOG_NEW_CATEGORY(surf, "All SURF categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)"); diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index 4d286c2f6e..8aa63e3804 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -6,6 +6,7 @@ /* surf_config: configuration infrastructure for the simulation world */ +#include "xbt/misc.h" #include "xbt/config.h" #include "xbt/log.h" #include "xbt/str.h" diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 8561b868b5..4aadf20d31 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -4,14 +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 /* regular expression library */ - #include "simgrid/platf_interface.h" // platform creation API internal interface #include "surf_routing_private.h" #include "surf/surf_routing.h" #include "surf/surfxml_parse_values.h" +#include /* regular expression library */ + /** * @ingroup SURF_build_api * @brief A library containing all known workstations diff --git a/src/surf/surf_routing_generic.c b/src/surf/surf_routing_generic.c index a3dd35c986..6f6d5878c8 100644 --- a/src/surf/surf_routing_generic.c +++ b/src/surf/surf_routing_generic.c @@ -4,14 +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 /* regular expression library */ - #include "simgrid/platf_interface.h" // platform creation API internal interface #include "surf_routing_private.h" #include "surf/surf_routing.h" #include "surf/surfxml_parse_values.h" +#include /* regular expression library */ + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing"); static int no_bypassroute_declared = 1; diff --git a/src/xbt/xbt_rl_time.c b/src/xbt/xbt_rl_time.c index 1fbf9eb7e5..5d36fd22f1 100644 --- a/src/xbt/xbt_rl_time.c +++ b/src/xbt/xbt_rl_time.c @@ -6,8 +6,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 /* floor */ - #include "portable.h" #include "xbt/sysdep.h" @@ -15,6 +13,8 @@ #include "gras/virtu.h" #include "xbt/xbt_os_time.h" /* private */ +#include /* floor */ + XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_virtu); double xbt_time(void) { diff --git a/testsuite/surf/maxmin_bench.c b/testsuite/surf/maxmin_bench.c index 4d0f905701..0d46aa5a81 100644 --- a/testsuite/surf/maxmin_bench.c +++ b/testsuite/surf/maxmin_bench.c @@ -11,13 +11,14 @@ #endif -#include -#include #include "surf/maxmin.h" #include "xbt/module.h" #include "xbt/xbt_os_time.h" #include "xbt/sysdep.h" /* time manipulation for benchmarking */ +#include +#include + double date; double float_random(double max); diff --git a/testsuite/surf/trace_usage.c b/testsuite/surf/trace_usage.c index 95514f5458..5b1de6d862 100644 --- a/testsuite/surf/trace_usage.c +++ b/testsuite/surf/trace_usage.c @@ -9,13 +9,15 @@ #pragma hdrstop #endif -#include -#include -#include #include "surf/trace_mgr.h" #include "surf/surf.h" #include "xbt/log.h" + +#include +#include +#include + XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); -- 2.20.1