aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-12-25 20:26:58 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-12-25 20:26:58 +0000
commit3b30a901b43c11c83ac598e0954c3c33a89d78fd (patch)
treed3cb44de69fa95516be20a38bc14cea0324e8200 /src/core
parentfc68ea6f7bedd491126ef57110b6362e9af8900f (diff)
downloadnginx-3b30a901b43c11c83ac598e0954c3c33a89d78fd.tar.gz
nginx-3b30a901b43c11c83ac598e0954c3c33a89d78fd.zip
nginx-0.0.1-2003-12-25-23:26:58 import
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.c6
-rw-r--r--src/core/ngx_conf_file.h3
-rw-r--r--src/core/ngx_connection.h2
-rw-r--r--src/core/ngx_regex.c5
-rw-r--r--src/core/ngx_regex.h3
5 files changed, 12 insertions, 7 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 7deb24fd3..eee88dc3f 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -204,11 +204,13 @@ int main(int argc, char *const *argv)
ngx_process_events(cycle->log);
if (done) {
+#if !(WIN32)
if (ngx_delete_file(pidfile.name.data) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
ngx_delete_file_n " \"%s\" failed",
pidfile.name.data);
}
+#endif
ngx_log_error(NGX_LOG_INFO,
cycle->log, 0, "exiting");
@@ -291,11 +293,11 @@ ngx_log_debug(log, "REOPEN: %d:%d:%s" _ fd _ file[i].fd _ file[i].name.data);
static ngx_cycle_t *ngx_init_cycle(ngx_cycle_t *old_cycle, ngx_log_t *log)
{
int i, n, failed;
- ngx_fd_t fd;
ngx_str_t conf_file;
ngx_conf_t conf;
ngx_pool_t *pool;
ngx_cycle_t *cycle, **old;
+ ngx_socket_t fd;
ngx_core_conf_t *ccf;
ngx_open_file_t *file;
ngx_listening_t *ls, *nls;
@@ -457,7 +459,7 @@ ngx_log_debug(log, "OPEN: %d:%s" _ file[i].fd _ file[i].name.data);
fd /= 4;
#endif
- if (fd >= cycle->connection_n) {
+ if (fd >= (ngx_socket_t) cycle->connection_n) {
ngx_log_error(NGX_LOG_EMERG, log, 0,
"%d connections is not enough to hold "
"an open listening socket on %s, "
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index eb9e63b51..536294779 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -24,9 +24,10 @@
#define NGX_CONF_TAKE9 0x00000200
#define NGX_CONF_TAKE12 (NGX_CONF_TAKE1|NGX_CONF_TAKE2)
-
#define NGX_CONF_TAKE13 (NGX_CONF_TAKE1|NGX_CONF_TAKE3)
+#define NGX_CONF_TAKE23 (NGX_CONF_TAKE2|NGX_CONF_TAKE3)
+
#define NGX_CONF_TAKE1234 (NGX_CONF_TAKE1|NGX_CONF_TAKE2|NGX_CONF_TAKE3 \
|NGX_CONF_TAKE4)
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 9312fba60..adb47911f 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -81,7 +81,7 @@ struct ngx_connection_s {
ngx_hunk_t *buffer;
- int number;
+ ngx_int_t number;
unsigned pipeline:1;
unsigned unexpected_eof:1;
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c
index a5d47d58c..167907be9 100644
--- a/src/core/ngx_regex.c
+++ b/src/core/ngx_regex.c
@@ -45,11 +45,12 @@ ngx_regex_t *ngx_regex_compile(ngx_str_t *pattern, ngx_int_t options,
}
-ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s)
+ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s,
+ int *matches, ngx_int_t size)
{
int rc;
- rc = pcre_exec(re, NULL, s->data, s->len, 0, 0, NULL, 0);
+ rc = pcre_exec(re, NULL, s->data, s->len, 0, 0, matches, size);
if (rc == -1) {
return NGX_DECLINED;
diff --git a/src/core/ngx_regex.h b/src/core/ngx_regex.h
index b6828cf54..3a99a2f36 100644
--- a/src/core/ngx_regex.h
+++ b/src/core/ngx_regex.h
@@ -15,7 +15,8 @@ typedef pcre ngx_regex_t;
void ngx_regex_init();
ngx_regex_t *ngx_regex_compile(ngx_str_t *pattern, ngx_int_t options,
ngx_pool_t *pool, ngx_str_t *err);
-ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s);
+ngx_int_t ngx_regex_exec(ngx_regex_t *re, ngx_str_t *s,
+ int *matches, ngx_int_t size);
#define ngx_regex_exec_n "pcre_exec()"