1
2 /*
3 * Copyright (C) Igor Sysoev
4 */
5
6
7 #ifndef _NGX_ERRNO_H_INCLUDED_
8 #define _NGX_ERRNO_H_INCLUDED_
9
10
11 #include <ngx_config.h>
12 #include <ngx_core.h>
13
14
15 typedef int ngx_err_t;
16
17 #define NGX_EPERM EPERM
18 #define NGX_ENOENT ENOENT
19 #define NGX_ENOPATH ENOENT
20 #define NGX_ESRCH ESRCH
21 #define NGX_EINTR EINTR
22 #define NGX_ECHILD ECHILD
23 #define NGX_ENOMEM ENOMEM
24 #define NGX_EACCES EACCES
25 #define NGX_EBUSY EBUSY
26 #define NGX_EEXIST EEXIST
27 #define NGX_EXDEV EXDEV
28 #define NGX_ENOTDIR ENOTDIR
29 #define NGX_EISDIR EISDIR
30 #define NGX_EINVAL EINVAL
31 #define NGX_ENOSPC ENOSPC
32 #define NGX_EPIPE EPIPE
33 #define NGX_EAGAIN EAGAIN
34 #define NGX_EINPROGRESS EINPROGRESS
35 #define NGX_EADDRINUSE EADDRINUSE
36 #define NGX_ECONNABORTED ECONNABORTED
37 #define NGX_ECONNRESET ECONNRESET
38 #define NGX_ENOTCONN ENOTCONN
39 #define NGX_ETIMEDOUT ETIMEDOUT
40 #define NGX_ECONNREFUSED ECONNREFUSED
41 #define NGX_ENAMETOOLONG ENAMETOOLONG
42 #define NGX_ENETDOWN ENETDOWN
43 #define NGX_ENETUNREACH ENETUNREACH
44 #define NGX_EHOSTDOWN EHOSTDOWN
45 #define NGX_EHOSTUNREACH EHOSTUNREACH
46 #define NGX_ENOSYS ENOSYS
47 #define NGX_ECANCELED ECANCELED
48 #define NGX_EILSEQ EILSEQ
49 #define NGX_ENOMOREFILES 0
50
51
52
53 #define ngx_errno errno
54 #define ngx_socket_errno errno
55 #define ngx_set_errno(err) errno = err
56 #define ngx_set_socket_errno(err) errno = err
57
58
59 #if (NGX_HAVE_STRERROR_R || NGX_HAVE_GNU_STRERROR_R)
60
61 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size);
62
63 #else
64
65 /* Solaris and Tru64 UNIX have thread-safe strerror() */
66
67 #define ngx_strerror_r(err, errstr, size) \
68 ngx_cpystrn(errstr, (u_char *) strerror(err), size)
69
70 #endif
71
72
73 #endif /* _NGX_ERRNO_H_INCLUDED_ */
74
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.