From: Martin Quinson Date: Tue, 13 Mar 2018 21:44:05 +0000 (+0100) Subject: public headers should include simgrid in a system-wide way, not a project-wide one X-Git-Tag: v3.19~53 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bd7d5780ee8b73efd58c83f5d6f864d0a941b3ed public headers should include simgrid in a system-wide way, not a project-wide one I'm not sure why stdio.h is not included by our public headers anymore, but that's actually a feature, not a bug. The user knows whether she wants to include stdio herself. --- diff --git a/doc/tuto-msg/masterworker-sol1.c b/doc/tuto-msg/masterworker-sol1.c index c0ceffc153..7441cab134 100644 --- a/doc/tuto-msg/masterworker-sol1.c +++ b/doc/tuto-msg/masterworker-sol1.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* sprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/doc/tuto-msg/masterworker-sol2.c b/doc/tuto-msg/masterworker-sol2.c index 317335f068..2b71a0bacc 100644 --- a/doc/tuto-msg/masterworker-sol2.c +++ b/doc/tuto-msg/masterworker-sol2.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* sprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/doc/tuto-msg/masterworker-sol3.c b/doc/tuto-msg/masterworker-sol3.c index 29d10fa57c..8cb7f1910a 100644 --- a/doc/tuto-msg/masterworker-sol3.c +++ b/doc/tuto-msg/masterworker-sol3.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* sprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/doc/tuto-msg/masterworker-sol4.c b/doc/tuto-msg/masterworker-sol4.c index 4aaade0948..890cdc41ed 100644 --- a/doc/tuto-msg/masterworker-sol4.c +++ b/doc/tuto-msg/masterworker-sol4.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* sprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/doc/tuto-msg/masterworker.c b/doc/tuto-msg/masterworker.c index 64cccb64b4..4ff16b002b 100644 --- a/doc/tuto-msg/masterworker.c +++ b/doc/tuto-msg/masterworker.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* sprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/examples/msg/app-masterworker/app-masterworker.c b/examples/msg/app-masterworker/app-masterworker.c index ff457765b5..55aaf69d14 100644 --- a/examples/msg/app-masterworker/app-masterworker.c +++ b/examples/msg/app-masterworker/app-masterworker.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2010-2016. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_app_masterworker, "Messages specific for this msg example"); /* Main function of the master process */ diff --git a/examples/msg/cloud-masterworker/cloud-masterworker.c b/examples/msg/cloud-masterworker/cloud-masterworker.c index 07c7556a52..93b2ef35e1 100644 --- a/examples/msg/cloud-masterworker/cloud-masterworker.c +++ b/examples/msg/cloud-masterworker/cloud-masterworker.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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,6 +6,8 @@ #include "simgrid/msg.h" #include "simgrid/plugins/live_migration.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define MAXMBOXLEN 64 diff --git a/examples/msg/dht-kademlia/dht-kademlia.c b/examples/msg/dht-kademlia/dht-kademlia.c index d40ca6c935..f9323730d0 100644 --- a/examples/msg/dht-kademlia/dht-kademlia.c +++ b/examples/msg/dht-kademlia/dht-kademlia.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2012, 2014-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 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. */ @@ -9,6 +8,9 @@ #include "task.h" #include "simgrid/msg.h" + +#include /* snprintf */ + /** @addtogroup MSG_examples * kademlia/kademlia.c: Kademlia protocol * Implements the Kademlia protocol, using 32 bits identifiers. diff --git a/examples/msg/dht-kademlia/node.c b/examples/msg/dht-kademlia/node.c index 2d8c22fd54..20b9fbe813 100644 --- a/examples/msg/dht-kademlia/node.c +++ b/examples/msg/dht-kademlia/node.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2010, 2012-2017. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -8,6 +7,8 @@ #include "routing_table.h" #include "simgrid/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_kademlia_node, "Messages specific for this msg example"); /** @brief Initialization of a node diff --git a/examples/msg/dht-pastry/dht-pastry.c b/examples/msg/dht-pastry/dht-pastry.c index c19cd35798..191ae07c1b 100644 --- a/examples/msg/dht-pastry/dht-pastry.c +++ b/examples/msg/dht-pastry/dht-pastry.c @@ -6,8 +6,9 @@ #include "simgrid/msg.h" #include "xbt/dynar.h" -#include +#include +#include XBT_LOG_NEW_DEFAULT_CATEGORY(msg_pastry, "Messages specific for this msg example"); diff --git a/examples/msg/network-ns3/network-ns3.c b/examples/msg/network-ns3/network-ns3.c index 390ca97228..f133b16339 100644 --- a/examples/msg/network-ns3/network-ns3.c +++ b/examples/msg/network-ns3/network-ns3.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); int timer_start; //set as 1 in the master process diff --git a/examples/msg/platform-failures/platform-failures.c b/examples/msg/platform-failures/platform-failures.c index 6875eb0de7..7771e50925 100644 --- a/examples/msg/platform-failures/platform-failures.c +++ b/examples/msg/platform-failures/platform-failures.c @@ -1,11 +1,12 @@ -/* Copyright (c) 2007-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); #define FINALIZE ((void*)221297) /* a magic number to tell people to stop working */ diff --git a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c index 2ea6b1bcf4..b3ccbfbeb1 100644 --- a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c +++ b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c @@ -1,10 +1,13 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" #include "mpi.h" + +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); static int master(int argc, char *argv[]) diff --git a/include/simgrid/forward.h b/include/simgrid/forward.h index 170910ddfd..ecf224bdad 100644 --- a/include/simgrid/forward.h +++ b/include/simgrid/forward.h @@ -8,8 +8,9 @@ #ifdef __cplusplus -#include "s4u/forward.hpp" -#include "xbt/base.h" +#include +#include + #include namespace simgrid { diff --git a/include/simgrid/host.h b/include/simgrid/host.h index 109540cdbd..2350923425 100644 --- a/include/simgrid/host.h +++ b/include/simgrid/host.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2018. 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. */ diff --git a/include/simgrid/instr.h b/include/simgrid/instr.h index d36c6cec5f..dcf444eba9 100644 --- a/include/simgrid/instr.h +++ b/include/simgrid/instr.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -7,8 +6,8 @@ #ifndef INSTR_H_ #define INSTR_H_ -#include "xbt.h" -#include "simgrid/msg.h" +#include +#include SG_BEGIN_DECL() diff --git a/include/simgrid/jedule/jedule.hpp b/include/simgrid/jedule/jedule.hpp index 6a19881333..dcc32d4b3c 100644 --- a/include/simgrid/jedule/jedule.hpp +++ b/include/simgrid/jedule/jedule.hpp @@ -1,16 +1,16 @@ -/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ #ifndef JEDULE_HPP_ #define JEDULE_HPP_ -#include "simgrid_config.h" -#include -#include "jedule_events.hpp" -#include "jedule_platform.hpp" +#include +#include +#include + +#include #if SIMGRID_HAVE_JEDULE diff --git a/include/simgrid/jedule/jedule_events.hpp b/include/simgrid/jedule/jedule_events.hpp index 6f57c01c8c..4362ffe89b 100644 --- a/include/simgrid/jedule/jedule_events.hpp +++ b/include/simgrid/jedule/jedule_events.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -7,14 +6,15 @@ #ifndef JEDULE_EVENTS_H_ #define JEDULE_EVENTS_H_ -#include "simgrid_config.h" -#include "simgrid/forward.h" +#include + +#include +#include + #include #include #include -#include "jedule_platform.hpp" - #if SIMGRID_HAVE_JEDULE namespace simgrid { namespace jedule{ diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp index d7a7b4c91f..1b0c32c4bc 100644 --- a/include/simgrid/jedule/jedule_platform.hpp +++ b/include/simgrid/jedule/jedule_platform.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -7,12 +6,14 @@ #ifndef JED_SIMGRID_PLATFORM_H_ #define JED_SIMGRID_PLATFORM_H_ -#include "simgrid_config.h" -#include "simgrid/forward.h" -#include "xbt/dynar.h" +#include +#include +#include + #include #include #include + #if SIMGRID_HAVE_JEDULE namespace simgrid { diff --git a/include/simgrid/jedule/jedule_sd_binding.h b/include/simgrid/jedule/jedule_sd_binding.h index 969cdfdfa2..5f5ab68d2d 100644 --- a/include/simgrid/jedule/jedule_sd_binding.h +++ b/include/simgrid/jedule/jedule_sd_binding.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2011, 2013-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -7,8 +6,8 @@ #ifndef JEDULE_SD_BINDING_H_ #define JEDULE_SD_BINDING_H_ -#include "simgrid_config.h" -#include "simgrid/simdag.h" +#include +#include #if SIMGRID_HAVE_JEDULE SG_BEGIN_DECL() @@ -17,6 +16,6 @@ XBT_PUBLIC void jedule_sd_init(void); XBT_PUBLIC void jedule_sd_exit(void); XBT_PUBLIC void jedule_sd_dump(const char* filename); SG_END_DECL() -#endif /* JEDULE_SD_BINDING_H_ */ - #endif + +#endif /* JEDULE_SD_BINDING_H_ */ diff --git a/include/simgrid/link.h b/include/simgrid/link.h index e3c465df13..07aecc945b 100644 --- a/include/simgrid/link.h +++ b/include/simgrid/link.h @@ -1,7 +1,6 @@ /* Public interface to the Link datatype */ -/* Copyright (c) 2015-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-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. */ @@ -9,8 +8,8 @@ #ifndef INCLUDE_SIMGRID_LINK_H_ #define INCLUDE_SIMGRID_LINK_H_ -#include "simgrid/forward.h" -#include "xbt/base.h" +#include +#include /* C interface */ SG_BEGIN_DECL() diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 387efa63f4..7609aa42d0 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -3,20 +3,20 @@ /* 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 MSG_H -#define MSG_H +#ifndef SIMGRID_MSG_H +#define SIMGRID_MSG_H -#include "simgrid/forward.h" -#include "simgrid/host.h" -#include "simgrid/plugins/live_migration.h" - -#include "xbt/base.h" -#include "xbt/dict.h" -#include "xbt/dynar.h" +#include +#include +#include +#include +#include +#include +#include #ifdef __cplusplus -#include "simgrid/simix.h" #include +#include namespace simgrid { namespace msg { class Comm; @@ -413,8 +413,6 @@ XBT_PUBLIC sg_host_t sg_vm_get_pm(sg_vm_t vm); XBT_PUBLIC void sg_vm_set_bound(sg_vm_t vm, double bound); #define MSG_vm_set_bound(vm, bound) sg_vm_set_bound(vm, bound) -#include "simgrid/instr.h" - /* ****************************************************************************************** */ /* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */ XBT_PUBLIC smx_context_t MSG_process_get_smx_ctx(msg_process_t process); diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 598721c0d4..661e52db8a 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -51,7 +51,7 @@ namespace s4u { * pure function or as an object. It is very simple with functions: * * @code{.cpp} - * #include "s4u/actor.hpp" + * #include * * // Declare the code of your worker * void worker() { @@ -69,7 +69,7 @@ namespace s4u { * The syntax is slightly more complicated, but not much. * * @code{.cpp} - * #include "s4u/actor.hpp" + * #include * * // Declare the class representing your actors * class Worker { diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 092908e408..c5d4e09828 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -6,17 +6,16 @@ #ifndef SIMGRID_S4U_HOST_HPP #define SIMGRID_S4U_HOST_HPP +#include +#include +#include +#include +#include + #include #include #include -#include "xbt/Extendable.hpp" -#include "xbt/signal.hpp" -#include "xbt/string.hpp" - -#include "simgrid/forward.h" -#include "simgrid/s4u/forward.hpp" - namespace simgrid { namespace xbt { diff --git a/include/simgrid/s4u/Mutex.hpp b/include/simgrid/s4u/Mutex.hpp index 6d589881c0..ce19858b40 100644 --- a/include/simgrid/s4u/Mutex.hpp +++ b/include/simgrid/s4u/Mutex.hpp @@ -11,8 +11,8 @@ #include +#include #include -#include "simgrid/simix.h" namespace simgrid { namespace s4u { diff --git a/include/simgrid/s4u/Storage.hpp b/include/simgrid/s4u/Storage.hpp index 5366365c08..dc9371074d 100644 --- a/include/simgrid/s4u/Storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2006-2015, 2017-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-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. */ @@ -7,13 +6,14 @@ #ifndef INCLUDE_SIMGRID_S4U_STORAGE_HPP_ #define INCLUDE_SIMGRID_S4U_STORAGE_HPP_ -#include "xbt/Extendable.hpp" -#include #include #include +#include +#include + +#include #include #include -#include namespace simgrid { namespace xbt { diff --git a/include/simgrid/s4u/VirtualMachine.hpp b/include/simgrid/s4u/VirtualMachine.hpp index ea9aff0bb2..89063d55fb 100644 --- a/include/simgrid/s4u/VirtualMachine.hpp +++ b/include/simgrid/s4u/VirtualMachine.hpp @@ -6,8 +6,8 @@ #ifndef SIMGRID_S4U_VM_HPP #define SIMGRID_S4U_VM_HPP -#include "simgrid/s4u/Host.hpp" -#include "simgrid/s4u/forward.hpp" +#include +#include enum e_surf_vm_state_t { SURF_VM_STATE_CREATED, /**< created, but not yet started */ diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h index 9194eabe67..cb54bd9b71 100644 --- a/include/simgrid/simdag.h +++ b/include/simgrid/simdag.h @@ -1,19 +1,20 @@ -/* Copyright (c) 2006-2010, 2012-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-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. */ -#ifndef SIMDAG_SIMDAG_H -#define SIMDAG_SIMDAG_H +#ifndef SIMGRID_SIMDAG_H +#define SIMGRID_SIMDAG_H + +#include +#include +#include +#include -#include "simgrid/host.h" -#include "simgrid/link.h" -#include "xbt/log.h" -#include "xbt/sysdep.h" #ifdef __cplusplus #include #endif + SG_BEGIN_DECL() /** @brief Link opaque datatype diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 5c2e970c05..6bd4bf6231 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -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. */ -#ifndef _SIMIX_SIMIX_H -#define _SIMIX_SIMIX_H +#ifndef SIMGRID_SIMIX_H +#define SIMGRID_SIMIX_H -#include "simgrid/forward.h" -#include "simgrid/host.h" -#include "xbt/ex.h" -#include "xbt/parmap.h" +#include +#include +#include +#include #ifdef __cplusplus #include #endif @@ -280,4 +280,4 @@ XBT_PUBLIC int simcall_mc_random(int min, int max); SG_END_DECL() -#endif /* _SIMIX_SIMIX_H */ +#endif diff --git a/include/xbt/RngStream.h b/include/xbt/RngStream.h index ffed6ac680..ad3336d5f5 100644 --- a/include/xbt/RngStream.h +++ b/include/xbt/RngStream.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2012, 2014-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 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. */ @@ -8,7 +7,7 @@ #ifndef RNGSTREAM_H #define RNGSTREAM_H -#include "misc.h" +#include typedef struct RngStream_InfoState * RngStream; diff --git a/include/xbt/asserts.h b/include/xbt/asserts.h index da09fbafaf..5e78a3bfe2 100644 --- a/include/xbt/asserts.h +++ b/include/xbt/asserts.h @@ -1,7 +1,6 @@ /* xbt/asserts.h -- assertion mechanism */ -/* Copyright (c) 2005-2007, 2009-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2005-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. */ @@ -9,9 +8,9 @@ #ifndef XBT_ASSERTS_H #define XBT_ASSERTS_H -#include "xbt/misc.h" -#include "xbt/log.h" -#include "xbt/ex.h" +#include +#include +#include SG_BEGIN_DECL() XBT_PUBLIC_DATA int xbt_log_no_loc; /* Do not show the backtrace on failed backtrace when doing our tests */ diff --git a/include/xbt/cunit.h b/include/xbt/cunit.h index 0edb99d701..296b582d16 100644 --- a/include/xbt/cunit.h +++ b/include/xbt/cunit.h @@ -10,8 +10,8 @@ #ifndef XBT_CUNIT_H_ #define XBT_CUNIT_H_ -#include "xbt/sysdep.h" /* XBT_GNU_PRINTF */ -#include "xbt/ex.h" +#include +#include /* XBT_GNU_PRINTF */ SG_BEGIN_DECL() diff --git a/include/xbt/dict.h b/include/xbt/dict.h index 3c27e58838..a4623bf575 100644 --- a/include/xbt/dict.h +++ b/include/xbt/dict.h @@ -8,8 +8,9 @@ #ifndef XBT_DICT_H #define XBT_DICT_H -#include "xbt/misc.h" /* SG_BEGIN_DECL */ -#include "xbt/dynar.h" /* void_f_pvoid_t */ +#include /* void_f_pvoid_t */ +#include /* SG_BEGIN_DECL */ + #include /* uintptr_t */ SG_BEGIN_DECL() diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 5a4e63efbf..dc6596c7a3 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -1,5 +1,4 @@ -/* Copyright (c) 2005-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2005-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. */ @@ -9,10 +8,10 @@ #include -#include "xbt/base.h" -#include "xbt/sysdep.h" -#include "xbt/misc.h" -#include "xbt/virtu.h" +#include +#include +#include +#include /** @addtogroup XBT_ex_c * @brief Exceptions support (C) diff --git a/include/xbt/function_types.h b/include/xbt/function_types.h index f9883a51d7..a08d9904f6 100644 --- a/include/xbt/function_types.h +++ b/include/xbt/function_types.h @@ -1,6 +1,6 @@ /* function_type.h - classical types for pointer to function */ -/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-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. */ @@ -8,7 +8,7 @@ #ifndef XBT_FUNCTION_TYPE_H #define XBT_FUNCTION_TYPE_H -#include "xbt/base.h" +#include SG_BEGIN_DECL() diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 8b73dabeaf..1c6983a120 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-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,6 +6,9 @@ #ifndef XBT_FUNCTIONAL_HPP #define XBT_FUNCTIONAL_HPP +#include +#include + #include #include #include @@ -20,9 +23,6 @@ #include #include -#include "xbt/sysdep.h" -#include "xbt/utility.hpp" - namespace simgrid { namespace xbt { diff --git a/include/xbt/graph.h b/include/xbt/graph.h index 5346279b79..e4cd6ef08f 100644 --- a/include/xbt/graph.h +++ b/include/xbt/graph.h @@ -5,8 +5,10 @@ #ifndef XBT_GRAPH_H #define XBT_GRAPH_H -#include "xbt/misc.h" /* SG_BEGIN_DECL */ -#include "xbt/dynar.h" + +#include +#include /* SG_BEGIN_DECL */ + SG_BEGIN_DECL() /** @addtogroup XBT_graph diff --git a/include/xbt/log.h b/include/xbt/log.h index ebaa88f44c..34bc142022 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -28,9 +28,9 @@ #ifndef XBT_LOG_H #define XBT_LOG_H -#include "xbt/misc.h" #include -#include /* NULL */ +#include /* NULL */ +#include SG_BEGIN_DECL() /**\brief Log priorities * \ingroup XBT_log diff --git a/include/xbt/mallocator.h b/include/xbt/mallocator.h index d6107d4bf9..7b76ed8fcc 100644 --- a/include/xbt/mallocator.h +++ b/include/xbt/mallocator.h @@ -1,7 +1,6 @@ /* xbt/mallocator.h -- api to recycle allocated objects */ -/* Copyright (c) 2006-2007, 2009-2010, 2012-2014, 2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-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. */ @@ -9,8 +8,9 @@ #ifndef XBT_MALLOCATOR_H #define XBT_MALLOCATOR_H -#include "xbt/function_types.h" -#include "xbt/misc.h" +#include +#include + SG_BEGIN_DECL() /** @addtogroup XBT_mallocator diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 0aea0698d0..c04f2089dc 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -1,7 +1,6 @@ -/* xbt.h - Public interface to the xbt (simgrid's toolbox) */ +/* xbt.h - Public interface to the xbt (simgrid's toolbox) */ -/* Copyright (c) 2004-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-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. */ @@ -9,9 +8,9 @@ #ifndef XBT_MISC_H #define XBT_MISC_H -#include "simgrid_config.h" -#include "base.h" -#include "dynar.h" +#include +#include +#include #include diff --git a/include/xbt/replay.hpp b/include/xbt/replay.hpp index dcbfa212c3..de1fbc53b2 100644 --- a/include/xbt/replay.hpp +++ b/include/xbt/replay.hpp @@ -1,7 +1,6 @@ /* xbt/replay_reader.h -- Tools to parse a replay file */ -/* Copyright (c) 2010, 2012-2015, 2017-2018. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -9,7 +8,8 @@ #ifndef XBT_REPLAY_HPP #define XBT_REPLAY_HPP -#include "xbt/misc.h" /* SG_BEGIN_DECL */ +#include /* SG_BEGIN_DECL */ + #ifdef __cplusplus #include #include diff --git a/include/xbt/str.h b/include/xbt/str.h index 31b2fa12d3..20b9a65b59 100644 --- a/include/xbt/str.h +++ b/include/xbt/str.h @@ -1,7 +1,6 @@ /* str.h - XBT string related functions. */ -/* Copyright (c) 2007-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-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. */ @@ -9,12 +8,11 @@ #ifndef XBT_STR_H #define XBT_STR_H -#include "xbt/dict.h" -#include "xbt/dynar.h" -#include "xbt/misc.h" +#include +#include +#include -#include /* va_* */ -#include /* FILE */ +#include /* va_* */ SG_BEGIN_DECL() diff --git a/include/xbt/synchro.h b/include/xbt/synchro.h index 3a990f18e9..a03505ae73 100644 --- a/include/xbt/synchro.h +++ b/include/xbt/synchro.h @@ -8,8 +8,8 @@ #ifndef XBT_THREAD_H #define XBT_THREAD_H -#include "xbt/function_types.h" -#include "xbt/misc.h" /* SG_BEGIN_DECL */ +#include +#include /* SG_BEGIN_DECL */ SG_BEGIN_DECL() diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index d0b94e7bcb..44ef89aa89 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -2,8 +2,7 @@ /* no system header should be loaded out of this file so that we have only */ /* one file to check when porting to another OS */ -/* Copyright (c) 2004-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-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. */ @@ -11,11 +10,11 @@ #ifndef XBT_SYSDEP_H #define XBT_SYSDEP_H -#include "xbt/log.h" -#include "xbt/misc.h" -#include "xbt/asserts.h" +#include +#include +#include -#include "simgrid_config.h" +#include #include #include diff --git a/include/xbt/virtu.h b/include/xbt/virtu.h index 1386a56d9c..834d39f724 100644 --- a/include/xbt/virtu.h +++ b/include/xbt/virtu.h @@ -8,10 +8,10 @@ #ifndef XBT_VIRTU_H #define XBT_VIRTU_H -#include "xbt/misc.h" -#include "xbt/base.h" -#include "xbt/function_types.h" -#include "xbt/dynar.h" +#include +#include +#include +#include SG_BEGIN_DECL() diff --git a/include/xbt/xbt_os_thread.h b/include/xbt/xbt_os_thread.h index f0e976b2ef..9c8c05e04c 100644 --- a/include/xbt/xbt_os_thread.h +++ b/include/xbt/xbt_os_thread.h @@ -8,11 +8,12 @@ #ifndef XBT_OS_THREAD_H #define XBT_OS_THREAD_H -#include "xbt/base.h" - SG_BEGIN_DECL() +#include + #include + typedef pthread_key_t xbt_os_thread_key_t; /** @addtogroup XBT_thread diff --git a/src/xbt/snprintf.c b/src/xbt/snprintf.c index c5fffcc3b3..c6e841f00d 100644 --- a/src/xbt/snprintf.c +++ b/src/xbt/snprintf.c @@ -49,9 +49,15 @@ * http://www.ijs.si/software/snprintf/ */ +/* find vasprintf in stdio.h */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include + #include "xbt/sysdep.h" /* xbt_abort() */ #include "src/internal_config.h" /* Do we need vasprintf? */ -#include + #include #if !HAVE_VASPRINTF diff --git a/teshsuite/mc/random-bug/random-bug.c b/teshsuite/mc/random-bug/random-bug.c index 9fbb738889..b74603af53 100644 --- a/teshsuite/mc/random-bug/random-bug.c +++ b/teshsuite/mc/random-bug/random-bug.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-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. */ @@ -7,6 +6,8 @@ #include #include +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(random_bug, "Application"); /** An (fake) application with a bug occuring for some random values */ diff --git a/teshsuite/msg/actions-comm/actions-comm.c b/teshsuite/msg/actions-comm/actions-comm.c index b431b35b31..a19af38fa5 100644 --- a/teshsuite/msg/actions-comm/actions-comm.c +++ b/teshsuite/msg/actions-comm/actions-comm.c @@ -1,4 +1,4 @@ -/* 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. */ @@ -6,6 +6,8 @@ #include #include +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(actions, "Messages specific for this msg example"); int communicator_size = 0; diff --git a/teshsuite/msg/actions-storage/actions-storage.c b/teshsuite/msg/actions-storage/actions-storage.c index e4cfac8c6e..4c6e458582 100644 --- a/teshsuite/msg/actions-storage/actions-storage.c +++ b/teshsuite/msg/actions-storage/actions-storage.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-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. */ @@ -7,6 +7,8 @@ #include "simgrid/plugins/file_system.h" #include +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(storage_actions, "Messages specific for this example"); static xbt_dict_t opened_files = NULL; diff --git a/teshsuite/msg/app-bittorrent/bittorrent-messages.c b/teshsuite/msg/app-bittorrent/bittorrent-messages.c index b735c7069a..540b6d5ac1 100644 --- a/teshsuite/msg/app-bittorrent/bittorrent-messages.c +++ b/teshsuite/msg/app-bittorrent/bittorrent-messages.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2012-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 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. */ @@ -7,6 +6,8 @@ #include "bittorrent-messages.h" #include "bittorrent.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_messages, "Messages specific for the message factory"); #define BITS_TO_BYTES(x) (((x) / 8 + (x) % 8) ? 1 : 0) diff --git a/teshsuite/msg/app-bittorrent/bittorrent-peer.c b/teshsuite/msg/app-bittorrent/bittorrent-peer.c index 3a6e22fcb4..f74cdf3cc8 100644 --- a/teshsuite/msg/app-bittorrent/bittorrent-peer.c +++ b/teshsuite/msg/app-bittorrent/bittorrent-peer.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 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. */ @@ -7,10 +7,12 @@ #include "bittorrent-messages.h" #include "connection.h" #include "tracker.h" -#include #include #include +#include +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_peers, "Messages specific for the peers"); /* diff --git a/teshsuite/msg/app-bittorrent/bittorrent.c b/teshsuite/msg/app-bittorrent/bittorrent.c index 7cad511cae..d34d5d4d68 100644 --- a/teshsuite/msg/app-bittorrent/bittorrent.c +++ b/teshsuite/msg/app-bittorrent/bittorrent.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2012-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 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. */ @@ -10,6 +9,8 @@ #include #include +#include /* snprintf */ + /** Bittorrent example launcher */ int main(int argc, char* argv[]) { diff --git a/teshsuite/msg/app-pingpong/app-pingpong.c b/teshsuite/msg/app-pingpong/app-pingpong.c index c4ed0d50ba..1c9744762b 100644 --- a/teshsuite/msg/app-pingpong/app-pingpong.c +++ b/teshsuite/msg/app-pingpong/app-pingpong.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_app_pingpong, "Messages specific for this msg example"); static int pinger(int argc, char* argv[]) diff --git a/teshsuite/msg/app-token-ring/app-token-ring.c b/teshsuite/msg/app-token-ring/app-token-ring.c index 50186721ca..013e9c3ab8 100644 --- a/teshsuite/msg/app-token-ring/app-token-ring.c +++ b/teshsuite/msg/app-token-ring/app-token-ring.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2008-2016. 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. */ #include "simgrid/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_app_token_ring, "Messages specific for this msg example"); /* Main function of all processes used in this example */ diff --git a/teshsuite/msg/async-wait/async-wait.c b/teshsuite/msg/async-wait/async-wait.c index beb85caca6..826bb5bca1 100644 --- a/teshsuite/msg/async-wait/async-wait.c +++ b/teshsuite/msg/async-wait/async-wait.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this msg example"); /* Main function of the Sender process */ diff --git a/teshsuite/msg/async-waitall/async-waitall.c b/teshsuite/msg/async-waitall/async-waitall.c index b5866909e9..abb6615c69 100644 --- a/teshsuite/msg/async-waitall/async-waitall.c +++ b/teshsuite/msg/async-waitall/async-waitall.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2010-2016. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this msg example"); static int sender(int argc, char* argv[]) diff --git a/teshsuite/msg/async-waitany/async-waitany.c b/teshsuite/msg/async-waitany/async-waitany.c index 2ae48e6d45..9eb12edeb0 100644 --- a/teshsuite/msg/async-waitany/async-waitany.c +++ b/teshsuite/msg/async-waitany/async-waitany.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2010-2016. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitany, "Messages specific for this msg example"); static int sender(int argc, char* argv[]) diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c index 10ab828b98..a13d6b4c8c 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* 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/msg.h" +#include /* sscanf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); xbt_dynar_t tests; diff --git a/teshsuite/msg/io-file-remote/io-file-remote.c b/teshsuite/msg/io-file-remote/io-file-remote.c index 0726701498..6b098a9645 100644 --- a/teshsuite/msg/io-file-remote/io-file-remote.c +++ b/teshsuite/msg/io-file-remote/io-file-remote.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-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,6 +6,8 @@ #include "simgrid/msg.h" #include +#include /* sscanf */ + #define INMEGA (1024 * 1024) XBT_LOG_NEW_DEFAULT_CATEGORY(remote_io, "Messages specific for this io example"); diff --git a/teshsuite/msg/io-file/io-file.c b/teshsuite/msg/io-file/io-file.c index 2c22834a82..2b445832d8 100644 --- a/teshsuite/msg/io-file/io-file.c +++ b/teshsuite/msg/io-file/io-file.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2016. 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. */ @@ -6,6 +6,8 @@ #include "simgrid/msg.h" #include "simgrid/plugins/file_system.h" +#include /* SEEK_SET */ + XBT_LOG_NEW_DEFAULT_CATEGORY(io_file, "Messages specific for this io example"); static int host(int argc, char* argv[]) diff --git a/teshsuite/msg/process-lifetime/process-lifetime.c b/teshsuite/msg/process-lifetime/process-lifetime.c index 5514c92996..f20bf79d30 100644 --- a/teshsuite/msg/process-lifetime/process-lifetime.c +++ b/teshsuite/msg/process-lifetime/process-lifetime.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-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/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); /* Executed on process termination*/ diff --git a/teshsuite/msg/process-yield/process-yield.c b/teshsuite/msg/process-yield/process-yield.c index ada22e374d..c6a6acb740 100644 --- a/teshsuite/msg/process-yield/process-yield.c +++ b/teshsuite/msg/process-yield/process-yield.c @@ -1,10 +1,12 @@ -/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2017-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/msg.h" +#include /* snprintf */ + /* This example does not much: It just spans over-polite processes that yield a large amount * of time before ending. * diff --git a/teshsuite/msg/task_progress/task_progress.cpp b/teshsuite/msg/task_progress/task_progress.cpp index adf5200278..3971b80b0c 100644 --- a/teshsuite/msg/task_progress/task_progress.cpp +++ b/teshsuite/msg/task_progress/task_progress.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. - * All rights reserved. */ +/* 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. */ @@ -7,6 +6,8 @@ #include #include "simgrid/msg.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); static std::vector tasks = std::vector(); diff --git a/teshsuite/xbt/mallocator/mallocator.c b/teshsuite/xbt/mallocator/mallocator.c index 180b254703..d8e3ffb5fe 100644 --- a/teshsuite/xbt/mallocator/mallocator.c +++ b/teshsuite/xbt/mallocator/mallocator.c @@ -1,6 +1,8 @@ #include "xbt/mallocator.h" #include "xbt.h" +#include /* snprintf */ + typedef struct element { int value; } s_element_t; diff --git a/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c b/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c index dc863824b7..a39cf7dd27 100644 --- a/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c +++ b/teshsuite/xbt/parallel_log_crashtest/parallel_log_crashtest.c @@ -1,7 +1,6 @@ /* synchro_crashtest -- tries to crash the logging mechanism by doing parallel logs*/ -/* Copyright (c) 2007-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-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. */ @@ -9,6 +8,8 @@ #include "simgrid/msg.h" #include "xbt.h" +#include /* snprintf */ + XBT_LOG_NEW_DEFAULT_CATEGORY(synchro_crashtest, "Logs of this example"); const int test_amount = 99; /* Up to 99 to not break the logs (and thus the testing mechanism) */