comparison src/os/unix/ngx_errno.h @ 604:428c6e58046a NGINX_0_9_0

nginx 0.9.0 *) Feature: the "keepalive_disable" directive. *) Feature: the "map" directive supports variables as value of a defined variable. *) Feature: the "map" directive supports empty strings as value of the first parameter. *) Feature: the "map" directive supports expressions as the first parameter. *) Feature: nginx(8) manual page. Thanks to Sergey Osokin. *) Feature: Linux accept4() support. Thanks to Simon Liu. *) Workaround: elimination of Linux linker warning about "sys_errlist" and "sys_nerr"; the warning had appeared in 0.8.35. *) Bugfix: a segmentation fault might occur in a worker process, if the "auth_basic" directive was used. Thanks to Michail Laletin. *) Bugfix: compatibility with ngx_http_eval_module; the bug had appeared in 0.8.42.
author Igor Sysoev <http://sysoev.ru>
date Mon, 29 Nov 2010 00:00:00 +0300
parents 016632f0fb18
children d0f7a625f27c
comparison
equal deleted inserted replaced
603:94ea26a3b3aa 604:428c6e58046a
58 #define ngx_socket_errno errno 58 #define ngx_socket_errno errno
59 #define ngx_set_errno(err) errno = err 59 #define ngx_set_errno(err) errno = err
60 #define ngx_set_socket_errno(err) errno = err 60 #define ngx_set_socket_errno(err) errno = err
61 61
62 62
63 #if (NGX_HAVE_STRERROR_R || NGX_HAVE_GNU_STRERROR_R) 63 u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
64 64 ngx_uint_t ngx_strerror_init(void);
65 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size);
66
67 #else
68
69 /* Solaris and Tru64 UNIX have thread-safe strerror() */
70
71 #define ngx_strerror_r(err, errstr, size) \
72 ngx_cpystrn(errstr, (u_char *) strerror(err), size)
73
74 #endif
75
76
77 #if (NGX_HAVE_SYS_ERRLIST)
78
79 #define ngx_sigsafe_strerror(err) \
80 (err > 0 && err < sys_nerr) ? sys_errlist[err] : "Unknown error"
81
82 #else
83
84 #define ngx_sigsafe_strerror(err) ""
85
86 #endif
87 65
88 66
89 #endif /* _NGX_ERRNO_H_INCLUDED_ */ 67 #endif /* _NGX_ERRNO_H_INCLUDED_ */