nginx/src/os/win32/ngx_errno.h

61 lines
2.1 KiB
C
Raw Normal View History

/*
* Copyright (C) Igor Sysoev
*/
#ifndef _NGX_ERRNO_H_INCLUDED_
#define _NGX_ERRNO_H_INCLUDED_
#include <ngx_config.h>
2003-06-03 23:42:58 +08:00
#include <ngx_core.h>
2003-06-03 23:42:58 +08:00
typedef DWORD ngx_err_t;
2002-09-02 22:48:24 +08:00
#define ngx_errno GetLastError()
2003-11-17 05:49:42 +08:00
#define ngx_set_errno(err) SetLastError(err)
2002-09-02 22:48:24 +08:00
#define ngx_socket_errno WSAGetLastError()
#define ngx_set_socket_errno(err) WSASetLastError(err)
#define NGX_EPERM ERROR_ACCESS_DENIED
2003-06-03 23:42:58 +08:00
#define NGX_ENOENT ERROR_FILE_NOT_FOUND
2009-08-11 22:25:04 +08:00
#define NGX_ENOPATH ERROR_PATH_NOT_FOUND
2006-11-20 16:51:45 +08:00
#define NGX_ENOMEM ERROR_NOT_ENOUGH_MEMORY
2003-06-03 23:42:58 +08:00
#define NGX_EACCES ERROR_ACCESS_DENIED
/* it's seems that ERROR_FILE_EXISTS is not appropriate error code */
#define NGX_EEXIST ERROR_ALREADY_EXISTS
/*
* could not found cross volume directory move error code,
* so use ERROR_WRONG_DISK as stub one
*/
#define NGX_EXDEV ERROR_WRONG_DISK
2003-06-03 23:42:58 +08:00
#define NGX_ENOTDIR ERROR_PATH_NOT_FOUND
#define NGX_EISDIR ERROR_CANNOT_MAKE
#define NGX_ENOSPC ERROR_DISK_FULL
2004-03-04 15:04:55 +08:00
#define NGX_EPIPE EPIPE
2003-06-03 23:42:58 +08:00
#define NGX_EAGAIN WSAEWOULDBLOCK
#define NGX_EINPROGRESS WSAEINPROGRESS
#define NGX_EADDRINUSE WSAEADDRINUSE
2004-03-04 15:04:55 +08:00
#define NGX_ECONNABORTED WSAECONNABORTED
#define NGX_ECONNRESET WSAECONNRESET
#define NGX_ENOTCONN WSAENOTCONN
2003-06-03 23:42:58 +08:00
#define NGX_ETIMEDOUT WSAETIMEDOUT
2004-03-15 04:46:25 +08:00
#define NGX_ECONNREFUSED WSAECONNREFUSED
#define NGX_ENAMETOOLONG ERROR_BAD_PATHNAME
#define NGX_ENETDOWN WSAENETDOWN
#define NGX_ENETUNREACH WSAENETUNREACH
#define NGX_EHOSTDOWN WSAEHOSTDOWN
2004-03-15 04:46:25 +08:00
#define NGX_EHOSTUNREACH WSAEHOSTUNREACH
2003-11-17 05:49:42 +08:00
#define NGX_ENOMOREFILES ERROR_NO_MORE_FILES
#define NGX_EILSEQ ERROR_NO_UNICODE_TRANSLATION
2003-11-17 05:49:42 +08:00
#define NGX_EALREADY WSAEALREADY
#define NGX_EINVAL WSAEINVAL
u_char *ngx_strerror_r(ngx_err_t err, u_char *errstr, size_t size);
#endif /* _NGX_ERRNO_H_INCLUDED_ */