replace limits.h with climits
The former was deprecated with C++14. The standard says they are the same with one exception: The header<climits>defines all macros the same as the C standard library header<limits.h>. [Note:The types of the constants defined by macros in<climits>are not required to match the types to which themacros refer.— end note] Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
5cd400f578
commit
4b57b7f5a5
@ -115,7 +115,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
|
|
||||||
static constexpr size_t KILOBYTE = 1024;
|
static constexpr size_t KILOBYTE = 1024;
|
||||||
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
#include <climits>
|
||||||
|
|
||||||
#include <sys/inotify.h>
|
#include <sys/inotify.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept
|
InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
#ifndef MPD_FS_LIMITS_HXX
|
#ifndef MPD_FS_LIMITS_HXX
|
||||||
#define MPD_FS_LIMITS_HXX
|
#define MPD_FS_LIMITS_HXX
|
||||||
|
|
||||||
|
#include <climits>
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
static constexpr size_t MPD_PATH_MAX = 260;
|
static constexpr size_t MPD_PATH_MAX = 260;
|
||||||
|
@ -27,9 +27,10 @@
|
|||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
|
#include <climits>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#ifndef HOST_NAME_MAX
|
#ifndef HOST_NAME_MAX
|
||||||
/* HOST_NAME_MAX is not a portable macro; it is undefined on some
|
/* HOST_NAME_MAX is not a portable macro; it is undefined on some
|
||||||
|
Loading…
Reference in New Issue
Block a user