Mercurial > hg > nginx-quic
view src/os/unix/ngx_errno.c @ 681:7e24168b0853 release-0.4.0
nginx-0.4.0-RELEASE import
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Aug 2006 10:39:17 +0000 |
parents | d4ea69372b94 |
children | 3d8ab5957202 |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev */ #include <ngx_config.h> #include <ngx_core.h> #if (NGX_HAVE_STRERROR_R) u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) { if (size == 0) { return 0; } errstr[0] = '\0'; strerror_r(err, (char *) errstr, size); while (*errstr && size) { errstr++; size--; } return errstr; } #elif (NGX_HAVE_GNU_STRERROR_R) /* Linux strerror_r() */ u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) { char *str; if (size == 0) { return 0; } errstr[0] = '\0'; str = strerror_r(err, (char *) errstr, size); if (str != (char *) errstr) { return ngx_cpystrn(errstr, (u_char *) str, size); } while (*errstr && size) { errstr++; size--; } return errstr; } #endif