Mercurial > hg > nginx-ranges
annotate src/os/unix/ngx_errno.c @ 96:ca4f70b3ccc6 NGINX_0_2_2
nginx 0.2.2
*) Feature: the "config errmsg" command of the ngx_http_ssi_module.
*) Change: the ngx_http_geo_module variables can be overridden by the
"set" directive.
*) Feature: the "ssl_protocols" and "ssl_prefer_server_ciphers"
directives of the ngx_http_ssl_module and ngx_imap_ssl_module.
*) Bugfix: the ngx_http_autoindex_module did not show correctly the
long file names;
*) Bugfix: the ngx_http_autoindex_module now do not show the files
starting by dot.
*) Bugfix: if the SSL handshake failed then another connection may be
closed too.
Thanks to Rob Mueller.
*) Bugfix: the export versions of MSIE 5.x could not connect via HTTPS.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 30 Sep 2005 00:00:00 +0400 |
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 |