change errno.h to cerrno

The former is deprecated by C++14. It's also functionally the same.

From the standard:

19.4
The header<cerrno>is described in Table 43. Its contents are the same as
the POSIX header<errno.h>,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 <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-12 15:51:16 -07:00
parent 2b3d6461e3
commit edc4989d9c
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
18 changed files with 29 additions and 19 deletions

View File

@ -21,9 +21,10 @@
#include "util/Domain.hxx"
#include "util/Exception.hxx"
#include <cerrno>
#include <stdio.h>
#include <string.h>
#include <errno.h>
static constexpr Domain exception_domain("exception");

View File

@ -49,10 +49,9 @@
#include "fs/io/GzipOutputStream.hxx"
#endif
#include <cerrno>
#include <memory>
#include <errno.h>
static constexpr Domain simple_db_domain("simple_db");
inline SimpleDatabase::SimpleDatabase(const ConfigBlock &block)

View File

@ -24,8 +24,9 @@
#include "system/Error.hxx"
#include "Log.hxx"
#include <cerrno>
#include <sys/inotify.h>
#include <errno.h>
#include <stdint.h>
#include <limits.h>

View File

@ -26,7 +26,7 @@
#include "fs/AllocatedPath.hxx"
#include "Log.hxx"
#include <errno.h>
#include <cerrno>
bool
GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept

View File

@ -39,12 +39,12 @@
#include "Log.hxx"
#include <cassert>
#include <cerrno>
#include <exception>
#include <memory>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
UpdateWalk::UpdateWalk(const UpdateConfig &_config,
EventLoop &_loop, DatabaseListener &_listener,

View File

@ -23,7 +23,7 @@
#include <algorithm>
#ifdef USE_EPOLL
#include <errno.h>
#include <cerrno>
#endif
#ifndef _WIN32

View File

@ -22,7 +22,8 @@
#include "Limits.hxx"
#include "system/Error.hxx"
#include <errno.h>
#include <cerrno>
#include <fcntl.h>
void

View File

@ -158,9 +158,10 @@ FileOutputStream::Cancel() noexcept
#else
#include <cerrno>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#ifdef HAVE_O_TMPFILE
#ifndef O_TMPFILE

View File

@ -22,7 +22,8 @@
#include "util/Compiler.h"
#include "system/Error.hxx"
#include <errno.h>
#include <cerrno>
#include <stdio.h>
static size_t

View File

@ -44,9 +44,10 @@
#include <net/if.h>
#endif
#include <cerrno>
#include <string.h>
#include <stdio.h>
#include <errno.h>
static inline bool
ai_is_passive(const struct addrinfo *ai)

View File

@ -42,7 +42,8 @@
#include <netinet/tcp.h>
#endif
#include <errno.h>
#include <cerrno>
#include <string.h>
int

View File

@ -27,7 +27,7 @@
#include <winsock2.h>
typedef DWORD socket_error_t;
#else
#include <errno.h>
#include <cerrno>
typedef int socket_error_t;
#endif

View File

@ -28,8 +28,9 @@
#include "Log.hxx"
#include "open.h"
#include <cerrno>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
class FifoOutput final : AudioOutput {

View File

@ -28,13 +28,13 @@
#include "Log.hxx"
#include <cassert>
#include <cerrno>
#include <iterator>
#include <stdexcept>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -22,12 +22,13 @@
#include "system/FileDescriptor.hxx"
#include "system/Error.hxx"
#include <cerrno>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#if defined(__sun)
#include <sys/audio.h>

View File

@ -92,7 +92,8 @@ FormatLastError(const char *fmt, Args&&... args) noexcept
#endif /* _WIN32 */
#include <errno.h>
#include <cerrno>
#include <string.h>
/**

View File

@ -30,7 +30,7 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <errno.h>
#include <cerrno>
#endif
static constexpr Domain fatal_error_domain("fatal_error");

View File

@ -20,8 +20,9 @@
#include "fs/io/FileOutputStream.hxx"
#include "util/PrintException.hxx"
#include <cerrno>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>