From edc4989d9c3ff89bfd4e4a178f8e057bed720d37 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 12 Mar 2020 15:51:16 -0700 Subject: change errno.h to cerrno The former is deprecated by C++14. It's also functionally the same. From the standard: 19.4 The headeris described in Table 43. Its contents are the same as the POSIX header,except that errno shall be defined as a macro. [Note: The intent is to remain in close alignment with the POSIX standard.] A separate errno value shall be provided for each thread. Signed-off-by: Rosen Penev --- src/Log.cxx | 3 ++- src/db/plugins/simple/SimpleDatabasePlugin.cxx | 3 +-- src/db/update/InotifySource.cxx | 3 ++- src/db/update/UpdateIO.cxx | 2 +- src/db/update/Walk.cxx | 2 +- src/event/MultiSocketMonitor.cxx | 2 +- src/fs/FileSystem.cxx | 3 ++- src/fs/io/FileOutputStream.cxx | 3 ++- src/lib/xiph/FlacIOHandle.cxx | 3 ++- src/net/Resolver.cxx | 3 ++- src/net/SocketDescriptor.cxx | 3 ++- src/net/SocketError.hxx | 2 +- src/output/plugins/FifoOutputPlugin.cxx | 3 ++- src/output/plugins/OssOutputPlugin.cxx | 2 +- src/output/plugins/SolarisOutputPlugin.cxx | 3 ++- src/system/Error.hxx | 3 ++- src/system/FatalError.cxx | 2 +- test/WriteFile.cxx | 3 ++- 18 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/Log.cxx b/src/Log.cxx index 686a60fb2..41e4958bc 100644 --- a/src/Log.cxx +++ b/src/Log.cxx @@ -21,9 +21,10 @@ #include "util/Domain.hxx" #include "util/Exception.hxx" +#include + #include #include -#include static constexpr Domain exception_domain("exception"); diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx index 05fc688a1..57c4ad47e 100644 --- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx +++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx @@ -49,10 +49,9 @@ #include "fs/io/GzipOutputStream.hxx" #endif +#include #include -#include - static constexpr Domain simple_db_domain("simple_db"); inline SimpleDatabase::SimpleDatabase(const ConfigBlock &block) diff --git a/src/db/update/InotifySource.cxx b/src/db/update/InotifySource.cxx index 4ee0d6afc..d36463113 100644 --- a/src/db/update/InotifySource.cxx +++ b/src/db/update/InotifySource.cxx @@ -24,8 +24,9 @@ #include "system/Error.hxx" #include "Log.hxx" +#include + #include -#include #include #include diff --git a/src/db/update/UpdateIO.cxx b/src/db/update/UpdateIO.cxx index 5743d9238..c122406c2 100644 --- a/src/db/update/UpdateIO.cxx +++ b/src/db/update/UpdateIO.cxx @@ -26,7 +26,7 @@ #include "fs/AllocatedPath.hxx" #include "Log.hxx" -#include +#include bool GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index 4ebd230da..bdc207825 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -39,12 +39,12 @@ #include "Log.hxx" #include +#include #include #include #include #include -#include UpdateWalk::UpdateWalk(const UpdateConfig &_config, EventLoop &_loop, DatabaseListener &_listener, diff --git a/src/event/MultiSocketMonitor.cxx b/src/event/MultiSocketMonitor.cxx index 4d7fe8f36..24365cfbc 100644 --- a/src/event/MultiSocketMonitor.cxx +++ b/src/event/MultiSocketMonitor.cxx @@ -23,7 +23,7 @@ #include #ifdef USE_EPOLL -#include +#include #endif #ifndef _WIN32 diff --git a/src/fs/FileSystem.cxx b/src/fs/FileSystem.cxx index f5869fcbb..31773aa88 100644 --- a/src/fs/FileSystem.cxx +++ b/src/fs/FileSystem.cxx @@ -22,7 +22,8 @@ #include "Limits.hxx" #include "system/Error.hxx" -#include +#include + #include void diff --git a/src/fs/io/FileOutputStream.cxx b/src/fs/io/FileOutputStream.cxx index 83518e177..fb07fe438 100644 --- a/src/fs/io/FileOutputStream.cxx +++ b/src/fs/io/FileOutputStream.cxx @@ -158,9 +158,10 @@ FileOutputStream::Cancel() noexcept #else +#include + #include #include -#include #ifdef HAVE_O_TMPFILE #ifndef O_TMPFILE diff --git a/src/lib/xiph/FlacIOHandle.cxx b/src/lib/xiph/FlacIOHandle.cxx index 1b523fcef..fb0079b20 100644 --- a/src/lib/xiph/FlacIOHandle.cxx +++ b/src/lib/xiph/FlacIOHandle.cxx @@ -22,7 +22,8 @@ #include "util/Compiler.h" #include "system/Error.hxx" -#include +#include + #include static size_t diff --git a/src/net/Resolver.cxx b/src/net/Resolver.cxx index d3c94c142..5b7adcb82 100644 --- a/src/net/Resolver.cxx +++ b/src/net/Resolver.cxx @@ -44,9 +44,10 @@ #include #endif +#include + #include #include -#include static inline bool ai_is_passive(const struct addrinfo *ai) diff --git a/src/net/SocketDescriptor.cxx b/src/net/SocketDescriptor.cxx index 158a44dbc..827ace4b8 100644 --- a/src/net/SocketDescriptor.cxx +++ b/src/net/SocketDescriptor.cxx @@ -42,7 +42,8 @@ #include #endif -#include +#include + #include int diff --git a/src/net/SocketError.hxx b/src/net/SocketError.hxx index fe783f034..3fa423202 100644 --- a/src/net/SocketError.hxx +++ b/src/net/SocketError.hxx @@ -27,7 +27,7 @@ #include typedef DWORD socket_error_t; #else -#include +#include typedef int socket_error_t; #endif diff --git a/src/output/plugins/FifoOutputPlugin.cxx b/src/output/plugins/FifoOutputPlugin.cxx index 336e1e123..20d123a1d 100644 --- a/src/output/plugins/FifoOutputPlugin.cxx +++ b/src/output/plugins/FifoOutputPlugin.cxx @@ -28,8 +28,9 @@ #include "Log.hxx" #include "open.h" +#include + #include -#include #include class FifoOutput final : AudioOutput { diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index 5ed07174d..a2bb078d5 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -28,13 +28,13 @@ #include "Log.hxx" #include +#include #include #include #include #include #include -#include #include #include diff --git a/src/output/plugins/SolarisOutputPlugin.cxx b/src/output/plugins/SolarisOutputPlugin.cxx index e50109557..bad4dfd4f 100644 --- a/src/output/plugins/SolarisOutputPlugin.cxx +++ b/src/output/plugins/SolarisOutputPlugin.cxx @@ -22,12 +22,13 @@ #include "system/FileDescriptor.hxx" #include "system/Error.hxx" +#include + #include #include #include #include #include -#include #if defined(__sun) #include diff --git a/src/system/Error.hxx b/src/system/Error.hxx index 5027e6864..0050eb9c6 100644 --- a/src/system/Error.hxx +++ b/src/system/Error.hxx @@ -92,7 +92,8 @@ FormatLastError(const char *fmt, Args&&... args) noexcept #endif /* _WIN32 */ -#include +#include + #include /** diff --git a/src/system/FatalError.cxx b/src/system/FatalError.cxx index 497897ca4..7e195a7d2 100644 --- a/src/system/FatalError.cxx +++ b/src/system/FatalError.cxx @@ -30,7 +30,7 @@ #ifdef _WIN32 #include #else -#include +#include #endif static constexpr Domain fatal_error_domain("fatal_error"); diff --git a/test/WriteFile.cxx b/test/WriteFile.cxx index 8fcd6bb19..587eecdb2 100644 --- a/test/WriteFile.cxx +++ b/test/WriteFile.cxx @@ -20,8 +20,9 @@ #include "fs/io/FileOutputStream.hxx" #include "util/PrintException.hxx" +#include + #include -#include #include #include -- cgit v1.2.3