summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-03-12 15:51:16 -0700
committerRosen Penev <rosenp@gmail.com>2020-03-12 15:51:16 -0700
commitedc4989d9c3ff89bfd4e4a178f8e057bed720d37 (patch)
treee58dc662154919b833db0bdae21522515bf4f594 /src/system
parent2b3d6461e3178e8f9887c60e57409ee1912d92ce (diff)
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>
Diffstat (limited to 'src/system')
-rw-r--r--src/system/Error.hxx3
-rw-r--r--src/system/FatalError.cxx2
2 files changed, 3 insertions, 2 deletions
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 <errno.h>
+#include <cerrno>
+
#include <string.h>
/**
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 <windows.h>
#else
-#include <errno.h>
+#include <cerrno>
#endif
static constexpr Domain fatal_error_domain("fatal_error");