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:
parent
2b3d6461e3
commit
edc4989d9c
@ -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");
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef USE_EPOLL
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include "Limits.hxx"
|
||||
#include "system/Error.hxx"
|
||||
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
void
|
||||
|
@ -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
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include "util/Compiler.h"
|
||||
#include "system/Error.hxx"
|
||||
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static size_t
|
||||
|
@ -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)
|
||||
|
@ -42,7 +42,8 @@
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <winsock2.h>
|
||||
typedef DWORD socket_error_t;
|
||||
#else
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
typedef int socket_error_t;
|
||||
#endif
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -92,7 +92,8 @@ FormatLastError(const char *fmt, Args&&... args) noexcept
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#endif
|
||||
|
||||
static constexpr Domain fatal_error_domain("fatal_error");
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user