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
18 changed files with 29 additions and 19 deletions

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