From 4b57b7f5a5e9de1a04f4db47025b20ad007c102c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 12 Mar 2020 16:14:04 -0700 Subject: [PATCH] replace limits.h with climits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The former was deprecated with C++14. The standard says they are the same with one exception: The headerdefines all macros the same as the C standard library header. [Note:The types of the constants defined by macros inare not required to match the types to which themacros refer.— end note] Signed-off-by: Rosen Penev --- src/Main.cxx | 2 +- src/db/update/InotifySource.cxx | 2 +- src/fs/Limits.hxx | 3 ++- src/zeroconf/ZeroconfGlue.cxx | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Main.cxx b/src/Main.cxx index 8b9692812..40e839b01 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -115,7 +115,7 @@ #include #endif -#include +#include static constexpr size_t KILOBYTE = 1024; static constexpr size_t MEGABYTE = 1024 * KILOBYTE; diff --git a/src/db/update/InotifySource.cxx b/src/db/update/InotifySource.cxx index d36463113..9952374bc 100644 --- a/src/db/update/InotifySource.cxx +++ b/src/db/update/InotifySource.cxx @@ -25,10 +25,10 @@ #include "Log.hxx" #include +#include #include #include -#include bool InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept diff --git a/src/fs/Limits.hxx b/src/fs/Limits.hxx index d6701c048..f9f0b905c 100644 --- a/src/fs/Limits.hxx +++ b/src/fs/Limits.hxx @@ -20,8 +20,9 @@ #ifndef MPD_FS_LIMITS_HXX #define MPD_FS_LIMITS_HXX +#include + #include -#include #if defined(_WIN32) static constexpr size_t MPD_PATH_MAX = 260; diff --git a/src/zeroconf/ZeroconfGlue.cxx b/src/zeroconf/ZeroconfGlue.cxx index 6241b0000..5fe6eff1d 100644 --- a/src/zeroconf/ZeroconfGlue.cxx +++ b/src/zeroconf/ZeroconfGlue.cxx @@ -27,9 +27,10 @@ #include "Log.hxx" #include "util/Compiler.h" +#include + #include #include -#include #ifndef HOST_NAME_MAX /* HOST_NAME_MAX is not a portable macro; it is undefined on some