Mercurial > hg > nginx-vendor-0-8
annotate src/os/unix/ngx_errno.c @ 138:8e6d4d96ec4c NGINX_0_3_16
nginx 0.3.16
*) Feature: the ngx_http_map_module.
*) Feature: the "types_hash_max_size" and "types_hash_bucket_size"
directives.
*) Feature: the "ssi_value_length" directive.
*) Feature: the "worker_rlimit_core" directive.
*) Workaround: the connection number in logs was always 1 if nginx was
built by the icc 8.1 or 9.0 compilers with optimization for
Pentium 4.
*) Bugfix: the "config timefmt" SSI command set incorrect time format.
*) Bugfix: nginx did not close connection to IMAP/POP3 backend for the
SSL connections; bug appeared in 0.3.13.
Thanks to Rob Mueller.
*) Bugfix: segmentation fault may occurred in at SSL shutdown; bug
appeared in 0.3.13.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 16 Dec 2005 00:00:00 +0300 |
parents | 72eb30262aac |
children | 88d3e895bdf9 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
18 | 11 #if (NGX_HAVE_STRERROR_R) |
0 | 12 |
10 | 13 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) |
0 | 14 { |
15 if (size == 0) { | |
16 return 0; | |
17 } | |
18 | |
19 errstr[0] = '\0'; | |
20 | |
10 | 21 strerror_r(err, (char *) errstr, size); |
0 | 22 |
10 | 23 while (*errstr && size) { |
24 errstr++; | |
25 size--; | |
0 | 26 } |
27 | |
10 | 28 return errstr; |
0 | 29 } |
30 | |
18 | 31 #elif (NGX_HAVE_GNU_STRERROR_R) |
0 | 32 |
33 /* Linux strerror_r() */ | |
34 | |
10 | 35 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) |
0 | 36 { |
50 | 37 char *str; |
0 | 38 |
39 if (size == 0) { | |
40 return 0; | |
41 } | |
42 | |
43 errstr[0] = '\0'; | |
44 | |
10 | 45 str = strerror_r(err, (char *) errstr, size); |
0 | 46 |
10 | 47 if (str != (char *) errstr) { |
48 return ngx_cpystrn(errstr, (u_char *) str, size); | |
0 | 49 } |
50 | |
10 | 51 while (*errstr && size) { |
52 errstr++; | |
53 size--; | |
0 | 54 } |
55 | |
10 | 56 return errstr; |
0 | 57 } |
58 | |
59 #endif |