2004-09-28 16:34:51 +08:00
|
|
|
|
|
|
|
/*
|
2004-09-30 00:00:49 +08:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 16:34:51 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-08-07 00:39:45 +08:00
|
|
|
#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>
|
2002-08-07 00:39:45 +08:00
|
|
|
|
2003-06-03 23:42:58 +08:00
|
|
|
|
|
|
|
typedef DWORD ngx_err_t;
|
2002-08-07 00:39:45 +08:00
|
|
|
|
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)
|
2002-08-07 00:39:45 +08:00
|
|
|
|
2006-04-19 23:30:56 +08:00
|
|
|
#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
|
2008-12-10 22:53:45 +08:00
|
|
|
/* it's seems that ERROR_FILE_EXISTS is not appropriate error code */
|
2004-11-21 03:52:20 +08:00
|
|
|
#define NGX_EEXIST ERROR_ALREADY_EXISTS
|
2008-12-10 22:53:45 +08:00
|
|
|
/*
|
|
|
|
* 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
|
2006-07-08 00:33:19 +08:00
|
|
|
#define NGX_EISDIR ERROR_CANNOT_MAKE
|
2006-04-14 17:53:38 +08:00
|
|
|
#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
|
2005-09-23 19:02:22 +08:00
|
|
|
#define NGX_ENAMETOOLONG ERROR_BAD_PATHNAME
|
2008-01-25 22:57:35 +08:00
|
|
|
#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
|
2009-03-30 22:51:51 +08:00
|
|
|
#define NGX_EILSEQ ERROR_NO_UNICODE_TRANSLATION
|
2003-11-17 05:49:42 +08:00
|
|
|
|
|
|
|
#define NGX_EALREADY WSAEALREADY
|
|
|
|
#define NGX_EINVAL WSAEINVAL
|
2002-08-07 00:39:45 +08:00
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
u_char *ngx_strerror_r(ngx_err_t err, u_char *errstr, size_t size);
|
2002-08-07 00:39:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* _NGX_ERRNO_H_INCLUDED_ */
|