error: prefix internal APIs with 'err_' rather than 'we_'
This commit is contained in:
parent
347ad5399e
commit
01c82b9364
@ -101,7 +101,7 @@
|
||||
X(WSAETIMEDOUT, ETIMEDOUT) \
|
||||
X(WSAEWOULDBLOCK, EWOULDBLOCK)
|
||||
|
||||
errno_t we_map_win_error_to_errno(DWORD error) {
|
||||
errno_t err_map_win_error_to_errno(DWORD error) {
|
||||
switch (error) {
|
||||
#define X(error_sym, errno_sym) \
|
||||
case error_sym: \
|
||||
@ -112,10 +112,10 @@ errno_t we_map_win_error_to_errno(DWORD error) {
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
void we_set_win_error(DWORD error) {
|
||||
void err_set_win_error(DWORD error) {
|
||||
if (error == 0)
|
||||
error = GetLastError();
|
||||
else
|
||||
SetLastError(error);
|
||||
errno = we_map_win_error_to_errno(error);
|
||||
errno = err_map_win_error_to_errno(error);
|
||||
}
|
||||
|
||||
@ -6,13 +6,13 @@
|
||||
#include "internal.h"
|
||||
#include "ntstatus.h"
|
||||
|
||||
EPOLL_INTERNAL errno_t we_map_win_error_to_errno(DWORD error);
|
||||
EPOLL_INTERNAL errno_t err_map_win_error_to_errno(DWORD error);
|
||||
|
||||
EPOLL_INTERNAL void we_set_win_error(DWORD error);
|
||||
EPOLL_INTERNAL void err_set_win_error(DWORD error);
|
||||
|
||||
#define _return_error_helper(error, value) \
|
||||
do { \
|
||||
we_set_win_error(error); \
|
||||
err_set_win_error(error); \
|
||||
/* { printf("%d\n", error); DebugBreak(); } */ \
|
||||
return (value); \
|
||||
} while (0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user