From: Christian Heinrich Date: Thu, 28 Jun 2018 07:55:40 +0000 (+0200) Subject: [SMPI] Move argument from const char* to std::string X-Git-Tag: v3_21~615 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/667f59ed88de481336b4c86ada687ff55751f8bd [SMPI] Move argument from const char* to std::string See for this one 2c03aca538a97089891fe7e67eca10d999c076fd as well --- diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index 1dbef70751..7392e9e536 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -585,17 +585,17 @@ static void smpi_init_privatization_dlopen(std::string executable) }; } -static void smpi_init_privatization_no_dlopen(const char* executable) +static void smpi_init_privatization_no_dlopen(std::string executable) { if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP) smpi_prepare_global_memory_segment(); // Load the dynamic library and resolve the entry point: - void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL); + void* handle = dlopen(executable.c_str(), RTLD_LAZY | RTLD_LOCAL); if (handle == nullptr) - xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable, dlerror(), errno, strerror(errno)); + xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable.c_str(), dlerror(), errno, strerror(errno)); smpi_entry_point_type entry_point = smpi_resolve_function(handle); if (not entry_point) - xbt_die("main not found in %s", executable); + xbt_die("main not found in %s", executable.c_str()); if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP) smpi_backup_global_memory_segment();