From 96e2e412a71421727a17803644c820c253f7ab56 Mon Sep 17 00:00:00 2001 From: Henri Casanova Date: Tue, 5 Nov 2024 15:12:00 -1000 Subject: [PATCH] LONG_LONG_MAX --> LLONG_MAX --- include/wrench/services/compute/ComputeService.h | 3 ++- include/wrench/simgrid_S4U_util/S4U_Simulation.h | 3 ++- src/wrench/services/Service.cpp | 2 +- src/wrench/simgrid_S4U_util/S4U_Simulation.cpp | 2 +- src/wrench/util/UnitParser.cpp | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/wrench/services/compute/ComputeService.h b/include/wrench/services/compute/ComputeService.h index 01794c084f..52ca0f67e2 100644 --- a/include/wrench/services/compute/ComputeService.h +++ b/include/wrench/services/compute/ComputeService.h @@ -15,6 +15,7 @@ #include #include #include +#include #include "wrench/services/Service.h" #include "wrench/job/Job.h" @@ -53,7 +54,7 @@ namespace wrench { /** @brief A convenient constant to mean "use all ram of a physical host" whenever a ram capacity * is needed when instantiating compute services */ - static constexpr sg_size_t ALL_RAM = LONG_LONG_MAX; + static constexpr sg_size_t ALL_RAM = LONG_MAX; /***********************/ /** \cond DEVELOPER **/ diff --git a/include/wrench/simgrid_S4U_util/S4U_Simulation.h b/include/wrench/simgrid_S4U_util/S4U_Simulation.h index 4b88cbf7f0..340e5c3398 100644 --- a/include/wrench/simgrid_S4U_util/S4U_Simulation.h +++ b/include/wrench/simgrid_S4U_util/S4U_Simulation.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -29,7 +30,7 @@ namespace wrench { class S4U_Simulation { public: /** @brief The ram capacity of a physical host whenever not specified in the platform description file */ - static constexpr sg_size_t DEFAULT_RAM = LONG_LONG_MAX; + static constexpr sg_size_t DEFAULT_RAM = LLONG_MAX; public: static void enableSMPI(); diff --git a/src/wrench/services/Service.cpp b/src/wrench/services/Service.cpp index 1c8c4c11d8..db22628f07 100644 --- a/src/wrench/services/Service.cpp +++ b/src/wrench/services/Service.cpp @@ -151,7 +151,7 @@ namespace wrench { std::string string_value; string_value = this->getPropertyValueAsString(property); if (string_value == "infinity") { - return LONG_LONG_MAX; + return LLONG_MAX; } if (string_value == "zero") { return 0; diff --git a/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp b/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp index 6208dada14..8a1ee38849 100755 --- a/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp +++ b/src/wrench/simgrid_S4U_util/S4U_Simulation.cpp @@ -1111,7 +1111,7 @@ namespace wrench { " at host " + hostname + " has invalid size"); } } else { - capacity = LONG_LONG_MAX;// Default size if no size property specified + capacity = LLONG_MAX;// Default size if no size property specified } return capacity; diff --git a/src/wrench/util/UnitParser.cpp b/src/wrench/util/UnitParser.cpp index 6a3beb2486..b998e9352b 100755 --- a/src/wrench/util/UnitParser.cpp +++ b/src/wrench/util/UnitParser.cpp @@ -112,7 +112,7 @@ namespace wrench { try { double value = parseValueWithUnit(string, units, "B"); // default: bytes if (value == DBL_MAX) { - return LONG_LONG_MAX; + return LLONG_MAX; } else { return (sg_size_t) value; }