From 047872771f0685df5ad0db3422b3333e26696330 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 28 Mar 2018 15:53:45 +0200 Subject: [PATCH] Rename sg_config.h -> sg_config.hpp. --- .../simgrid/{sg_config.h => sg_config.hpp} | 7 ++----- src/instr/instr_paje_header.cpp | 4 ++-- src/instr/instr_paje_trace.cpp | 4 ++-- src/mc/ModelChecker.cpp | 4 ++-- src/mc/Session.cpp | 4 ++-- src/mc/checker/simgrid_mc.cpp | 2 +- src/mc/mc_config.cpp | 4 ++-- src/s4u/s4u_link.cpp | 4 ++-- src/simdag/sd_global.cpp | 2 +- src/simgrid/sg_config.cpp | 2 +- src/simix/smx_context.cpp | 4 ++-- src/simix/smx_global.cpp | 2 +- src/smpi/bindings/smpi_mpi.cpp | 2 +- src/smpi/internals/instr_smpi.cpp | 2 +- src/surf/cpu_cas01.cpp | 2 +- src/surf/host_clm03.cpp | 4 ++-- src/surf/network_cm02.cpp | 2 +- src/surf/network_ib.cpp | 2 +- src/surf/network_interface.cpp | 2 +- src/surf/network_smpi.cpp | 4 ++-- src/surf/sg_platf.cpp | 18 +++++++++--------- src/surf/surf_interface.cpp | 4 ++-- src/surf/xml/surfxml_sax_cb.cpp | 2 +- src/xbt/config.cpp | 12 ++++++------ src/xbt/ex.cpp | 2 +- src/xbt/xbt_main.cpp | 2 +- tools/cmake/DefinePackages.cmake | 2 +- 27 files changed, 51 insertions(+), 54 deletions(-) rename src/include/simgrid/{sg_config.h => sg_config.hpp} (86%) diff --git a/src/include/simgrid/sg_config.h b/src/include/simgrid/sg_config.hpp similarity index 86% rename from src/include/simgrid/sg_config.h rename to src/include/simgrid/sg_config.hpp index a72e8ce6d9..a11602fc29 100644 --- a/src/include/simgrid/sg_config.h +++ b/src/include/simgrid/sg_config.hpp @@ -3,14 +3,13 @@ /* 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. */ -#ifndef SIMGRID_CONFIG_H -#define SIMGRID_CONFIG_H +#ifndef SIMGRID_CONFIG_HPP +#define SIMGRID_CONFIG_HPP #include "xbt/config.h" #include "xbt/config.hpp" /** Config Globals */ -SG_BEGIN_DECL() XBT_PUBLIC_DATA xbt_cfg_t simgrid_config; XBT_PUBLIC_DATA int _sg_cfg_init_status; @@ -19,6 +18,4 @@ XBT_PUBLIC_DATA int _sg_cfg_exit_asap; XBT_PUBLIC void sg_config_init(int* argc, char** argv); XBT_PUBLIC void sg_config_finalize(); -SG_END_DECL() - #endif diff --git a/src/instr/instr_paje_header.cpp b/src/instr/instr_paje_header.cpp index 8e293adbb8..26dca6a43d 100644 --- a/src/instr/instr_paje_header.cpp +++ b/src/instr/instr_paje_header.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2010, 2012-2017. The SimGrid Team. +/* Copyright (c) 2010, 2012-2018. The SimGrid Team. * All rights reserved. */ /* 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 "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_header, instr, "Paje tracing event system (header)"); diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index e4aea24ee7..c736811258 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. +/* Copyright (c) 2010-2018. The SimGrid Team. * All rights reserved. */ /* 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 "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" #include "src/instr/instr_smpi.hpp" #include "src/smpi/include/private.hpp" diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 53ebd7efbd..adb52a96a1 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2017. The SimGrid Team. +/* Copyright (c) 2008-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -19,7 +19,7 @@ #include "xbt/log.h" #include "xbt/system_error.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/mc/ModelChecker.hpp" #include "src/mc/ModelChecker.hpp" diff --git a/src/mc/Session.cpp b/src/mc/Session.cpp index a01cf122ce..97834f19a4 100644 --- a/src/mc/Session.cpp +++ b/src/mc/Session.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. +/* Copyright (c) 2015-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -13,7 +13,7 @@ #include "xbt/system_error.hpp" #include #include -#include +#include #include "src/mc/Session.hpp" #include "src/mc/checker/Checker.hpp" diff --git a/src/mc/checker/simgrid_mc.cpp b/src/mc/checker/simgrid_mc.cpp index af02035c7c..7f3d39a4cf 100644 --- a/src/mc/checker/simgrid_mc.cpp +++ b/src/mc/checker/simgrid_mc.cpp @@ -16,7 +16,7 @@ #include -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/xbt_modinter.h" #include "src/mc/Session.hpp" diff --git a/src/mc/mc_config.cpp b/src/mc/mc_config.cpp index bfee44943a..260bfe8acd 100644 --- a/src/mc/mc_config.cpp +++ b/src/mc/mc_config.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2018. The SimGrid Team. All rights reserved. */ /* 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. */ @@ -10,7 +10,7 @@ #include "src/mc/mc_replay.hpp" #include -#include +#include #if SIMGRID_HAVE_MC #include "src/mc/mc_private.hpp" diff --git a/src/s4u/s4u_link.cpp b/src/s4u/s4u_link.cpp index b0de6a60ca..269f3ab138 100644 --- a/src/s4u/s4u_link.cpp +++ b/src/s4u/s4u_link.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ /* 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. */ @@ -6,7 +6,7 @@ #include #include "simgrid/s4u/Link.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "simgrid/simix.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/simdag/sd_global.cpp b/src/simdag/sd_global.cpp index 1a31386a8d..aafbc559db 100644 --- a/src/simdag/sd_global.cpp +++ b/src/simdag/sd_global.cpp @@ -6,7 +6,7 @@ #include "simdag_private.hpp" #include "simgrid/kernel/resource/Action.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/include/instr/instr_interface.h" #include "src/surf/surf_interface.hpp" diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 843e37382e..6c6dfec814 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -5,7 +5,7 @@ /* sg_config: configuration infrastructure for the simulation world */ -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "instr/instr_interface.h" #include "mc/mc.h" #include "simgrid/instr.h" diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp index 40c6f00b3c..933ef547b7 100644 --- a/src/simix/smx_context.cpp +++ b/src/simix/smx_context.cpp @@ -1,6 +1,6 @@ /* a fast and simple context switching library */ -/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */ /* 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. */ @@ -17,7 +17,7 @@ #include #include "simgrid/modelchecker.h" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "smx_private.hpp" #include "src/internal_config.h" #include "xbt/log.h" diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index f79169b16a..be1826fe62 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -23,7 +23,7 @@ #include "xbt/ex.h" /* ex_backtrace_display */ #include "mc/mc.h" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/mc/mc_replay.hpp" #include "src/surf/StorageImpl.hpp" diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index 09ed6729c1..bdcf2d51d5 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -4,7 +4,7 @@ * under the terms of the license ,(GNU LGPL) which comes with this package. */ #include "private.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)"); diff --git a/src/smpi/internals/instr_smpi.cpp b/src/smpi/internals/instr_smpi.cpp index 5e44075442..1ce8ac64f1 100644 --- a/src/smpi/internals/instr_smpi.cpp +++ b/src/smpi/internals/instr_smpi.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI"); diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index a81898f9eb..808b78a949 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -5,7 +5,7 @@ #include "cpu_cas01.hpp" #include "cpu_ti.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "xbt/utility.hpp" #include diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index bada373f45..3cbf508945 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. +/* Copyright (c) 2013-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,7 +11,7 @@ #include "host_clm03.hpp" #include "cpu_cas01.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 72bce2129b..f300d63b73 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -7,7 +7,7 @@ #include "network_cm02.hpp" #include "simgrid/s4u/Host.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals #include "src/kernel/lmm/maxmin.hpp" diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 76418ae1b9..7d2ecbfa6b 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -6,7 +6,7 @@ #include -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/kernel/lmm/maxmin.hpp" #include "src/surf/HostImpl.hpp" #include "src/surf/network_ib.hpp" diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 6cc6da9011..950e535ef0 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -6,7 +6,7 @@ #include #include "network_interface.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #ifndef NETWORK_INTERFACE_CPP_ #define NETWORK_INTERFACE_CPP_ diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index 47b0d16a0d..c5b221067f 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. +/* Copyright (c) 2013-2018. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -10,7 +10,7 @@ #include #include "network_smpi.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "smpi_utils.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 1644840fe8..6718257610 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -3,15 +3,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 "simgrid/s4u/Engine.hpp" -#include "simgrid/s4u/Storage.hpp" -#include "src/kernel/EngineImpl.hpp" -#include "src/simix/smx_private.hpp" -#include "src/include/simgrid/sg_config.h" -#include "src/surf/HostImpl.hpp" -#include "src/surf/cpu_interface.hpp" -#include "src/surf/network_interface.hpp" -#include "src/surf/xml/platf_private.hpp" #include "simgrid/kernel/routing/ClusterZone.hpp" #include "simgrid/kernel/routing/DijkstraZone.hpp" #include "simgrid/kernel/routing/DragonflyZone.hpp" @@ -23,6 +14,15 @@ #include "simgrid/kernel/routing/NetZoneImpl.hpp" #include "simgrid/kernel/routing/TorusZone.hpp" #include "simgrid/kernel/routing/VivaldiZone.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Storage.hpp" +#include "src/include/simgrid/sg_config.hpp" +#include "src/kernel/EngineImpl.hpp" +#include "src/simix/smx_private.hpp" +#include "src/surf/HostImpl.hpp" +#include "src/surf/cpu_interface.hpp" +#include "src/surf/network_interface.hpp" +#include "src/surf/xml/platf_private.hpp" #include diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index dcb2444df3..c1729908bc 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -7,12 +7,12 @@ #include "mc/mc.h" #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals #include "src/kernel/lmm/maxmin.hpp" // Constraint #include "src/surf/HostImpl.hpp" -#include "xbt/utility.hpp" #include "src/surf/xml/platf.hpp" +#include "xbt/utility.hpp" #include #include diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 7a9d0175cc..3aa93c7489 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -5,7 +5,7 @@ #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/surf/network_interface.hpp" #include "xbt/file.hpp" diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 5ca3c34908..9596c567dd 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -19,18 +19,18 @@ #include #include -#include -#include -#include +#include "simgrid/sg_config.hpp" +#include "xbt/dynar.h" +#include "xbt/log.h" #include "xbt/misc.h" #include "xbt/sysdep.h" -#include "xbt/log.h" -#include "xbt/dynar.h" +#include +#include +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support"); XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr; -extern "C" XBT_PUBLIC void sg_config_finalize(); namespace simgrid { namespace config { diff --git a/src/xbt/ex.cpp b/src/xbt/ex.cpp index 19906e6c8f..280c279f6a 100644 --- a/src/xbt/ex.cpp +++ b/src/xbt/ex.cpp @@ -18,7 +18,7 @@ #include "xbt/backtrace.hpp" #include "src/xbt_modinter.h" /* backtrace initialization headers */ -#include "simgrid/sg_config.h" /* Configuration mechanism of SimGrid */ +#include "simgrid/sg_config.hpp" /* Configuration mechanism of SimGrid */ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_ex, xbt, "Exception mechanism"); diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 85cb4d226d..61d8a93f71 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -20,7 +20,7 @@ #include "src/xbt_modinter.h" /* prototype of other module's init/exit in XBT */ -#include "simgrid/sg_config.h" +#include "simgrid/sg_config.hpp" #include "src/internal_config.h" #include diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 2c020f2c40..fca4b9cdc9 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -5,7 +5,7 @@ set(EXTRA_DIST src/include/instr/instr_interface.h src/include/mc/datatypes.h src/include/mc/mc.h - src/include/simgrid/sg_config.h + src/include/simgrid/sg_config.hpp src/include/surf/surf.hpp src/include/xbt/parmap.hpp src/include/xbt/mmalloc.h -- 2.20.1