Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use C++ style includes when available.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Jul 2017 07:26:54 +0000 (09:26 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Jul 2017 11:54:52 +0000 (13:54 +0200)
52 files changed:
examples/simdag/test/sd_test.cpp
include/simgrid/jedule/jedule.hpp
include/xbt/string.hpp
src/bindings/java/jmsg.cpp
src/bindings/java/jxbt_utilities.cpp
src/bindings/lua/lua_platf.cpp
src/kernel/context/Context.hpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/FloydZone.cpp
src/kernel/routing/NetPoint.hpp
src/mc/PageStore.cpp
src/mc/Session.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_comm_pattern.cpp
src/mc/mc_snapshot.cpp
src/mc/mc_state.cpp
src/mc/mc_unw.cpp
src/mc/remote/Channel.cpp
src/mc/remote/RemoteClient.cpp
src/mc/remote/mc_protocol.cpp
src/msg/msg_actions.cpp
src/simdag/sd_dotloader.cpp
src/simix/smx_global.cpp
src/smpi/colls/alltoall/alltoall-2dmesh.cpp
src/smpi/colls/alltoall/alltoall-3dmesh.cpp
src/smpi/colls/reduce/reduce-rab.cpp
src/smpi/colls/smpi_automatic_selector.cpp
src/smpi/internals/instr_smpi.cpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_global.cpp
src/smpi/internals/smpi_memory.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/mpi/smpi_topo.cpp
src/surf/fair_bottleneck.cpp
src/surf/lagrange.cpp
src/surf/maxmin.cpp
src/surf/storage_n11.cpp
src/surf/trace_mgr.cpp
src/surf/trace_mgr_test.cpp
src/xbt/config.cpp
src/xbt/cunit.cpp
src/xbt/dict.cpp
src/xbt/ex.cpp
src/xbt/parmap.cpp
src/xbt/xbt_main.cpp
teshsuite/mc/dwarf-expression/dwarf-expression.cpp
teshsuite/mc/dwarf/dwarf.cpp
teshsuite/s4u/comm-waitany/comm-waitany.cpp
teshsuite/simdag/is-router/is-router.cpp
teshsuite/surf/lmm_usage/lmm_usage.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
teshsuite/xbt/mmalloc/mmalloc_test.cpp

index 5ba0bc0..3b3de64 100644 (file)
@@ -1,16 +1,16 @@
-/* Copyright (c) 2006-2015. The SimGrid Team.
+/* Copyright (c) 2006-2017. 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. */
 
  * 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/simdag.h"
 #include "simgrid/s4u.hpp"
 #include "simgrid/s4u.hpp"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/ex.h"
-#include <xbt/ex.hpp>
 #include "xbt/log.h"
 #include "xbt/log.h"
-#include <math.h>
+#include <cmath>
 #include <set>
 #include <set>
+#include <xbt/ex.hpp>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(sd_test, "Logging specific to this SimDag example");
 
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(sd_test, "Logging specific to this SimDag example");
 
index 43387f2..ebb956e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2016. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,8 +6,8 @@
 
 #ifndef JEDULE_HPP_
 #define JEDULE_HPP_
 
 #ifndef JEDULE_HPP_
 #define JEDULE_HPP_
-#include <stdio.h>
 #include "simgrid_config.h"
 #include "simgrid_config.h"
+#include <cstdio>
 
 #include "jedule_events.hpp"
 #include "jedule_platform.hpp"
 
 #include "jedule_events.hpp"
 #include "jedule_platform.hpp"
index cafddcb..912fe8d 100644 (file)
@@ -8,15 +8,14 @@
 
 #include <simgrid_config.h>
 
 
 #include <simgrid_config.h>
 
-#include <string>
 #include <cstdarg>
 #include <cstdarg>
-#include <stdlib.h>
+#include <cstdlib>
+#include <string>
 
 #if SIMGRID_HAVE_MC
 
 #include <stdexcept>
 #include <cstddef>
 
 #if SIMGRID_HAVE_MC
 
 #include <stdexcept>
 #include <cstddef>
-#include <cstdlib>
 #include <cstring>
 #include <iterator>
 
 #include <cstring>
 #include <iterator>
 
index 4f76619..11342f2 100644 (file)
@@ -5,7 +5,7 @@
 /* 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. */
 
 /* 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 <locale.h>
+#include <clocale>
 
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
 
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
index 128f077..a5e6ed1 100644 (file)
@@ -8,7 +8,7 @@
 #include "xbt/sysdep.h"
 #include "jxbt_utilities.h"
 
 #include "xbt/sysdep.h"
 #include "jxbt_utilities.h"
 
-#include <stdlib.h> /* abort */
+#include <cstdlib> /* abort */
 
 SG_BEGIN_DECL()
 
 
 SG_BEGIN_DECL()
 
index 6f9f856..c0b812c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -10,8 +10,8 @@
 #include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/xml/platf_private.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 #include "src/surf/xml/platf_private.hpp"
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
 
 extern "C" {
 #include <lauxlib.h>
 
 extern "C" {
 #include <lauxlib.h>
index 087b175..e45c097 100644 (file)
@@ -30,8 +30,8 @@
 #include "xbt/swag.h"
 #include "xbt/xbt_os_time.h"
 
 #include "xbt/swag.h"
 #include "xbt/xbt_os_time.h"
 
-#include <signal.h>
 #include "src/simix/ActorImpl.hpp"
 #include "src/simix/ActorImpl.hpp"
+#include <csignal>
 
 #include <simgrid/simix.hpp>
 
 
 #include <simgrid/simix.hpp>
 
index 0efd92e..b5c5313 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. 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. */
 
 /* 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. */
@@ -7,7 +7,7 @@
 #include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
 #include "src/kernel/routing/NetPoint.hpp"
 #include "src/surf/network_interface.hpp"
 
-#include <float.h>
+#include <cfloat>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
 
index 457b0e1..863c876 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. 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. */
 
 /* 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. */
@@ -8,7 +8,7 @@
 #include "src/surf/network_interface.hpp"
 #include "xbt/log.h"
 
 #include "src/surf/network_interface.hpp"
 #include "xbt/log.h"
 
-#include <float.h>
+#include <cfloat>
 #include <limits>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
 #include <limits>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
index 285ef6a..fd54a2f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2017. 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. */
 
 /* 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/signal.hpp>
 
 #include "src/kernel/routing/NetZoneImpl.hpp"
 #include <xbt/signal.hpp>
 
 #include "src/kernel/routing/NetZoneImpl.hpp"
-/*
-#include <float.h>
-#include <vector>
-*/
+
 namespace simgrid {
 namespace kernel {
 namespace routing {
 namespace simgrid {
 namespace kernel {
 namespace routing {
index 29d624c..20d3e5e 100644 (file)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. 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. */
 
  * 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 <cstring> // memcpy, memcmp
 #include <unistd.h>
 #include <unistd.h>
-#include <string.h> // memcpy, memcmp
 
 #include <sys/mman.h>
 #ifdef __FreeBSD__
 
 #include <sys/mman.h>
 #ifdef __FreeBSD__
index d38c528..810351b 100644 (file)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2015-2016. The SimGrid Team.
+/* Copyright (c) 2015-2017. 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. */
 
  * 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 <csignal>
 #include <fcntl.h>
 #include <fcntl.h>
-#include <signal.h>
 
 #include <functional>
 
 
 #include <functional>
 
index 9f7775c..daf52a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,10 +6,10 @@
 
 #include <unistd.h>
 
 
 #include <unistd.h>
 
+#include <cstring>
+#include <dirent.h>
 #include <fcntl.h>
 #include <fcntl.h>
-#include <string.h>
 #include <link.h>
 #include <link.h>
-#include <dirent.h>
 
 #ifndef WIN32
 #include <sys/mman.h>
 
 #ifndef WIN32
 #include <sys/mman.h>
index 3f3d1bd..cb7029c 100644 (file)
@@ -3,7 +3,7 @@
 /* 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. */
 
 /* 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 <string.h>
+#include <cstring>
 
 #include "xbt/dynar.h"
 #include "xbt/sysdep.h"
 
 #include "xbt/dynar.h"
 #include "xbt/sysdep.h"
index e365f98..11dba26 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -196,8 +196,8 @@ const void* Snapshot::read_bytes(void* buffer, std::size_t size,
 
 #ifdef SIMGRID_TEST
 
 
 #ifdef SIMGRID_TEST
 
-#include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
+#include <cstring>
 
 #include <sys/mman.h>
 
 
 #include <sys/mman.h>
 
index 1a36d31..0bce019 100644 (file)
@@ -3,7 +3,7 @@
 /* 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. */
 
 /* 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 <assert.h>
+#include <cassert>
 
 #include <boost/range/algorithm.hpp>
 
 
 #include <boost/range/algorithm.hpp>
 
index 6b2d206..ebe8c8e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -11,7 +11,7 @@
 // We need this for the register indices:
 // #define _GNU_SOURCE
 
 // We need this for the register indices:
 // #define _GNU_SOURCE
 
-#include <string.h>
+#include <cstring>
 
 // On x86_64, libunwind unw_context_t has the same layout as ucontext_t:
 #include <sys/types.h>
 
 // On x86_64, libunwind unw_context_t has the same layout as ucontext_t:
 #include <sys/types.h>
index 6c4000d..1fee675 100644 (file)
@@ -1,10 +1,10 @@
-/* Copyright (c) 2015-2016. The SimGrid Team.
+/* Copyright (c) 2015-2017. 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. */
 
  * 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 <errno.h>
+#include <cerrno>
 #include <unistd.h>
 
 #include <sys/socket.h>
 #include <unistd.h>
 
 #include <sys/socket.h>
index f96e1e5..306421e 100644 (file)
@@ -5,10 +5,10 @@
 
 #define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
 
 
 #define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
 
-#include <assert.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdint.h>
+#include <cassert>
+#include <cerrno>
+#include <cstddef>
+#include <cstdint>
 
 #include <sys/ptrace.h>
 
 
 #include <sys/ptrace.h>
 
index 74bec4e..6567377 100644 (file)
@@ -1,13 +1,13 @@
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. 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. */
 
  * 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 <cerrno>
 #include <cstddef> // std::size_t
 #include <cstddef> // std::size_t
-#include <errno.h>
-#include <stdio.h> // perror
-#include <string.h>
+#include <cstdio>  // perror
+#include <cstring>
 
 #include <sys/socket.h>
 #include <sys/types.h>
 
 #include <sys/socket.h>
 #include <sys/types.h>
index b5d171a..9557caa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. 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. */
 
 /* 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 "src/msg/msg_private.h"
 #include "xbt/replay.hpp"
 
 #include "src/msg/msg_private.h"
 #include "xbt/replay.hpp"
 
-#include <errno.h>
+#include <cerrno>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
 
index 619fcb1..7c82c61 100644 (file)
@@ -8,7 +8,7 @@
 #include "simgrid/simdag.h"
 #include "src/internal_config.h"
 #include "xbt/file.h"
 #include "simgrid/simdag.h"
 #include "src/internal_config.h"
 #include "xbt/file.h"
-#include <string.h>
+#include <cstring>
 #include <unordered_map>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_dotparse, sd, "Parsing DOT files");
 #include <unordered_map>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_dotparse, sd, "Parsing DOT files");
index f0f8268..124897c 100644 (file)
@@ -6,9 +6,9 @@
 #include <functional>
 #include <memory>
 
 #include <functional>
 #include <memory>
 
-#include <signal.h> /* Signal handling */
-#include <stdlib.h>
 #include "src/internal_config.h"
 #include "src/internal_config.h"
+#include <csignal> /* Signal handling */
+#include <cstdlib>
 
 #include <xbt/functional.hpp>
 
 
 #include <xbt/functional.hpp>
 
@@ -37,7 +37,6 @@
 #include "src/mc/mc_private.h"
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
 #include "src/mc/mc_private.h"
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
-#include <stdlib.h>
 #endif
 
 #include "src/mc/mc_record.h"
 #endif
 
 #include "src/mc/mc_record.h"
index 062d5cb..e75003a 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-#include <math.h>
+#include <cmath>
 
 /*****************************************************************************
 
 
 /*****************************************************************************
 
index bb8ca3d..85baad3 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-#include <math.h>
+#include <cmath>
 
 /*****************************************************************************
 
 
 /*****************************************************************************
 
index ac19cd5..b2c90e0 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 #include "../colls_private.h"
  */
 
 #include "../colls_private.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 
 #define REDUCE_NEW_ALWAYS 1
 
 
 #define REDUCE_NEW_ALWAYS 1
 
index 017e61e..3ffffa0 100644 (file)
@@ -4,7 +4,7 @@
 /* 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. */
 
 /* 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 <float.h>
+#include <cfloat>
 
 #include <exception>
 
 
 #include <exception>
 
index 52e6e4b..ec33a27 100644 (file)
@@ -6,10 +6,10 @@
 
 #include "private.h"
 #include "private.hpp"
 
 #include "private.h"
 #include "private.hpp"
-#include <ctype.h>
+#include <cctype>
+#include <cstdarg>
+#include <cwchar>
 #include <simgrid/sg_config.h>
 #include <simgrid/sg_config.h>
-#include <stdarg.h>
-#include <wchar.h>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
 
index 6342bd9..44fdedf 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef WIN32
 #include <sys/mman.h>
 #endif
 #ifndef WIN32
 #include <sys/mman.h>
 #endif
-#include <math.h> // sqrt
+#include <cmath>
 
 #if HAVE_PAPI
 #include <papi.h>
 
 #if HAVE_PAPI
 #include <papi.h>
index 47fa986..e864e81 100644 (file)
 #include "smpi_info.hpp"
 #include "smpi_process.hpp"
 
 #include "smpi_info.hpp"
 #include "smpi_process.hpp"
 
+#include <cfloat> /* DBL_MAX */
 #include <dlfcn.h>
 #include <fcntl.h>
 #include <dlfcn.h>
 #include <fcntl.h>
-#include <sys/stat.h>
-#include <float.h> /* DBL_MAX */
 #include <fstream>
 #include <fstream>
+#include <sys/stat.h>
 
 #if HAVE_SENDFILE
 #include <sys/sendfile.h>
 
 #if HAVE_SENDFILE
 #include <sys/sendfile.h>
index 719b28b..a3d9b14 100644 (file)
@@ -9,13 +9,13 @@
 
 #include <vector>
 
 
 #include <vector>
 
-#include <stdlib.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdio.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <errno.h>
+#include <sys/types.h>
 
 #ifndef WIN32
 #include <sys/mman.h>
 
 #ifndef WIN32
 #include <sys/mman.h>
index cd4b820..0d51fb0 100644 (file)
 #include "private.hpp"
 #include "xbt/dict.h"
 #include "xbt/ex.hpp"
 #include "private.hpp"
 #include "xbt/dict.h"
 #include "xbt/ex.hpp"
-#include <errno.h>
+#include <cerrno>
 
 #include <sys/types.h>
 #ifndef WIN32
 #include <sys/mman.h>
 #endif
 
 #include <sys/types.h>
 #ifndef WIN32
 #include <sys/mman.h>
 #endif
-#include <sys/stat.h>
+#include <cstdio>
 #include <fcntl.h>
 #include <fcntl.h>
-#include <string.h>
-#include <stdio.h>
+#include <sys/stat.h>
 
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
index fa3701d..b55b0e3 100644 (file)
@@ -3,13 +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. */
 
 /* 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/sysdep.h"
 #include "smpi/smpi.h"
 #include "private.h"
 #include "smpi/smpi.h"
 #include "private.h"
-#include <vector>
-#include <math.h>
 #include "smpi_comm.hpp"
 #include "smpi_topo.hpp"
 #include "smpi_comm.hpp"
 #include "smpi_topo.hpp"
+#include "xbt/sysdep.h"
+#include <cmath>
+#include <vector>
 
 /* static functions */
 static int assignnodes(int ndim, int nfactor, int *pfacts,int **pdims);
 
 /* static functions */
 static int assignnodes(int ndim, int nfactor, int *pfacts,int **pdims);
index 2f44bdb..2a0fcb7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2011, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2007-2011, 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,9 +7,9 @@
 #include "maxmin_private.hpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
 #include "maxmin_private.hpp"
 #include "xbt/log.h"
 #include "xbt/sysdep.h"
-#include <float.h>
-#include <math.h>
-#include <stdlib.h>
+#include <cfloat>
+#include <cmath>
+#include <cstdlib>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin);
 #define SHOW_EXPR_G(expr) XBT_DEBUG(#expr " = %g",expr);
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin);
 #define SHOW_EXPR_G(expr) XBT_DEBUG(#expr " = %g",expr);
index dc52269..7e70a86 100644 (file)
@@ -11,9 +11,9 @@
 #include "xbt/sysdep.h"
 #include "maxmin_private.hpp"
 
 #include "xbt/sysdep.h"
 #include "maxmin_private.hpp"
 
-#include <stdlib.h>
+#include <cstdlib>
 #ifndef MATH
 #ifndef MATH
-#include <math.h>
+#include <cmath>
 #endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_lagrange, surf, "Logging specific to SURF (lagrange)");
 #endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_lagrange, surf, "Logging specific to SURF (lagrange)");
index 0fafd62..02c65df 100644 (file)
@@ -9,10 +9,10 @@
 #include "xbt/log.h"
 #include "xbt/mallocator.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/mallocator.h"
 #include "xbt/sysdep.h"
+#include <cmath>
+#include <cstdlib>
 #include <cxxabi.h>
 #include <limits>
 #include <cxxabi.h>
 #include <limits>
-#include <math.h>
-#include <stdlib.h>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)");
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)");
 
index 5131db9..c05e8a5 100644 (file)
@@ -6,7 +6,7 @@
 #include "storage_n11.hpp"
 #include "simgrid/s4u/Engine.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
 #include "storage_n11.hpp"
 #include "simgrid/s4u/Engine.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
-#include <math.h> /*ceil*/
+#include <cmath> /*ceil*/
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
 
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
 
index 7771715..16eb4f8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2005, 2007, 2009-2014. The SimGrid Team.
+/* Copyright (c) 2004-2005, 2007, 2009-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -16,8 +16,8 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/join.hpp>
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/join.hpp>
 #include <boost/algorithm/string/split.hpp>
+#include <cmath>
 #include <fstream>
 #include <fstream>
-#include <math.h>
 #include <sstream>
 #include <unordered_map>
 
 #include <sstream>
 #include <unordered_map>
 
index bc2d47c..333f185 100644 (file)
@@ -15,7 +15,7 @@ bool init_unit_test(); // boost forget to give this prototype on NetBSD, which d
 #include "xbt/log.h"
 #include "xbt/misc.h"
 
 #include "xbt/log.h"
 #include "xbt/misc.h"
 
-#include <math.h>
+#include <cmath>
 
 namespace utf  = boost::unit_test;
 namespace tmgr = simgrid::trace_mgr;
 
 namespace utf  = boost::unit_test;
 namespace tmgr = simgrid::trace_mgr;
index 9b3fedb..af5c602 100644 (file)
@@ -1,9 +1,9 @@
-/* Copyright (c) 2004-2014,2016. The SimGrid Team. All rights reserved.     */
+/* Copyright (c) 2004-2017. 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. */
 
 
 /* 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 <stdio.h>
+#include <cstdio>
 
 #include <algorithm>
 #include <cerrno>
 
 #include <algorithm>
 #include <cerrno>
index eac5f1a..1bf8176 100644 (file)
@@ -9,7 +9,7 @@
 /* At some point we should use https://github.com/google/googletest instead */
 
 #include "src/internal_config.h"
 /* At some point we should use https://github.com/google/googletest instead */
 
 #include "src/internal_config.h"
-#include <stdio.h>
+#include <cstdio>
 
 #include <xbt/ex.hpp>
 #include "xbt/sysdep.h"         /* bvprintf */
 
 #include <xbt/ex.hpp>
 #include "xbt/sysdep.h"         /* bvprintf */
index 7436c33..6f46820 100644 (file)
@@ -6,8 +6,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. */
 
 /* 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 <string.h>
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
 
 #include "xbt/dict.h"
 #include "xbt/ex.h"
 
 #include "xbt/dict.h"
 #include "xbt/ex.h"
@@ -554,11 +554,11 @@ void xbt_dict_postexit()
 }
 
 #ifdef SIMGRID_TEST
 }
 
 #ifdef SIMGRID_TEST
-#include <time.h>
+#include "src/internal_config.h"
 #include "xbt.h"
 #include "xbt/ex.h"
 #include "xbt.h"
 #include "xbt/ex.h"
+#include <ctime>
 #include <xbt/ex.hpp>
 #include <xbt/ex.hpp>
-#include "src/internal_config.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_dict);
 
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_dict);
 
index 9115b40..50a97f1 100644 (file)
@@ -41,8 +41,8 @@
 /* The extensions made for the SimGrid project can either be distributed    */
 /* under the same license, or under the LGPL v2.1                           */
 
 /* The extensions made for the SimGrid project can either be distributed    */
 /* under the same license, or under the LGPL v2.1                           */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
 
 #include <xbt/backtrace.hpp>
 #include "src/internal_config.h"           /* execinfo when available */
 
 #include <xbt/backtrace.hpp>
 #include "src/internal_config.h"           /* execinfo when available */
@@ -113,8 +113,8 @@ const char *xbt_ex_catname(xbt_errcat_t cat)
 }
 
 #ifdef SIMGRID_TEST
 }
 
 #ifdef SIMGRID_TEST
-#include <stdio.h>
 #include "xbt/ex.h"
 #include "xbt/ex.h"
+#include <cstdio>
 #include <xbt/ex.hpp>
 
 XBT_TEST_SUITE("xbt_ex", "Exception Handling");
 #include <xbt/ex.hpp>
 
 XBT_TEST_SUITE("xbt_ex", "Exception Handling");
index df47a7a..935149f 100644 (file)
@@ -16,8 +16,8 @@
 #endif
 
 #if HAVE_FUTEX_H
 #endif
 
 #if HAVE_FUTEX_H
+#include <climits>
 #include <linux/futex.h>
 #include <linux/futex.h>
-#include <limits.h>
 #endif
 
 #include "xbt/parmap.h"
 #endif
 
 #include "xbt/parmap.h"
index f4ba9ab..ffd97cd 100644 (file)
@@ -7,14 +7,14 @@
 
 #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
 
 
 #define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
 
-#include <math.h>
-#include "xbt/misc.h"
 #include "simgrid_config.h"
 #include "simgrid_config.h"
-#include "xbt/sysdep.h"
+#include "xbt/config.h"
+#include "xbt/dynar.h"
 #include "xbt/log.h"
 #include "xbt/log.hpp"
 #include "xbt/log.h"
 #include "xbt/log.hpp"
-#include "xbt/dynar.h"
-#include "xbt/config.h"
+#include "xbt/misc.h"
+#include "xbt/sysdep.h"
+#include <cmath>
 
 #include "xbt/module.h"         /* this module */
 
 
 #include "xbt/module.h"         /* this module */
 
@@ -23,9 +23,9 @@
 #include "simgrid/sg_config.h"
 
 #include "src/internal_config.h"
 #include "simgrid/sg_config.h"
 
 #include "src/internal_config.h"
-#include <stdio.h>
+#include <cstdio>
 #ifdef _WIN32
 #ifdef _WIN32
-#include <signal.h> /* To silence MSVC on abort() */
+#include <csignal> /* To silence MSVC on abort() */
 #endif
 #if HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
 #if HAVE_UNISTD_H
 #  include <unistd.h>
index afc7d12..5cd9b46 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,9 +8,9 @@
 #undef NDEBUG
 #endif
 
 #undef NDEBUG
 #endif
 
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
 
 #include "src/mc/mc_private.h"
 
 
 #include "src/mc/mc_private.h"
 
index 20e0645..886d410 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,8 +8,8 @@
 #undef NDEBUG
 #endif
 
 #undef NDEBUG
 #endif
 
-#include <string.h>
-#include <assert.h>
+#include <cassert>
+#include <cstring>
 
 #include <mc/mc.h>
 
 
 #include <mc/mc.h>
 
index 6b96583..ce34e61 100644 (file)
@@ -3,9 +3,9 @@
 /* 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. */
 
 /* 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 <cstdlib>
 #include <iostream>
 #include <simgrid/s4u.hpp>
 #include <iostream>
 #include <simgrid/s4u.hpp>
-#include <stdlib.h>
 #include <vector>
 
 #define NUM_COMMS 1
 #include <vector>
 
 #define NUM_COMMS 1
index 0b09725..a45915e 100644 (file)
@@ -8,7 +8,7 @@
 #include "simgrid/simdag.h"
 #include "src/kernel/routing/NetPoint.hpp"
 #include <algorithm>
 #include "simgrid/simdag.h"
 #include "src/kernel/routing/NetPoint.hpp"
 #include <algorithm>
-#include <stdio.h>
+#include <cstdio>
 
 int main(int argc, char **argv)
 {
 
 int main(int argc, char **argv)
 {
index ce8eac5..c35f437 100644 (file)
@@ -1,6 +1,6 @@
 /* A few tests for the maxmin library                                       */
 
 /* A few tests for the maxmin library                                       */
 
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -12,7 +12,7 @@
 #include "xbt/log.h"
 #include "xbt/module.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/module.h"
 #include "xbt/sysdep.h"
-#include <math.h>
+#include <cmath>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
 
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
 
index aed2abb..6d115ab 100644 (file)
@@ -1,6 +1,6 @@
 /* A crash few tests for the maxmin library                                 */
 
 /* A crash few tests for the maxmin library                                 */
 
-/* Copyright (c) 2004-2015. The SimGrid Team.
+/* Copyright (c) 2004-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -14,9 +14,9 @@
 
 #define MYRANDMAX 1000
 
 
 #define MYRANDMAX 1000
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
 
 double date;
 int64_t seedx = 0;
 
 double date;
 int64_t seedx = 0;
index c480421..569c756 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,12 +6,12 @@
 
 #include "xbt/mmalloc.h"
 #include "xbt.h"
 
 #include "xbt/mmalloc.h"
 #include "xbt.h"
-#include <stdio.h>
-#include <assert.h>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
 
 #include <xbt/ex.hpp>
 #include <unistd.h>
 
 #include <xbt/ex.hpp>