Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-12-21 15:30:30 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-12-21 15:30:30 +0300
commitb1dfe478a03ad6919f174812951f6a2bec8befae (patch)
treed8802484f8dbf5309b17a95b5fc9749627720a53 /src/core
parent5275a8b3ac534ff36973801ec2aa6ce1214d7cc9 (diff)
nginx-0.1.13-RELEASE importrelease-0.1.13
*) Feature: the server_names_hash and server_names_hash_threshold directives. *) Bugfix: the *.domain.tld names in the "server_name" directive did not work. *) Bugfix: the %request_length log parameter logged the incorrect length.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/core/ngx_config.h4
-rw-r--r--src/core/ngx_connection.c2
-rw-r--r--src/core/ngx_palloc.c6
-rw-r--r--src/core/ngx_string.c8
-rw-r--r--src/core/ngx_string.h3
-rw-r--r--src/core/ngx_times.c6
-rw-r--r--src/core/ngx_times.h2
8 files changed, 16 insertions, 17 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index a36895e35..3286519ad 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.1.12"
+#define NGINX_VER "nginx/0.1.13"
#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index b72add7f7..fcef373c3 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -87,12 +87,8 @@ typedef long ngx_flag_t;
#endif
-/* TODO: auto */
#define NGX_INT32_LEN sizeof("-2147483648") - 1
#define NGX_INT64_LEN sizeof("-9223372036854775808") - 1
-#define NGX_OFF_T_LEN sizeof("-9223372036854775808") - 1
-
-#define NGX_MAX_INT_LEN (sizeof("-9223372036854775808") - 1)
#if (NGX_SOLARIS)
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 631cd4fa9..cc9640c21 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -253,7 +253,7 @@ ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle)
}
if (failed) {
- ngx_log_error(NGX_LOG_EMERG, log, 0, "still can not bind()");
+ ngx_log_error(NGX_LOG_EMERG, log, 0, "still could not bind()");
return NGX_ERROR;
}
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c
index ed13de513..c1b55e552 100644
--- a/src/core/ngx_palloc.c
+++ b/src/core/ngx_palloc.c
@@ -36,7 +36,7 @@ void ngx_destroy_pool(ngx_pool_t *pool)
ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, pool->log, 0, "free: %p", l->alloc);
if (l->alloc) {
- free(l->alloc);
+ ngx_free(l->alloc);
}
}
@@ -59,7 +59,7 @@ void ngx_destroy_pool(ngx_pool_t *pool)
#endif
for (p = pool, n = pool->next; /* void */; p = n, n = n->next) {
- free(p);
+ ngx_free(p);
if (n == NULL) {
break;
@@ -163,7 +163,7 @@ ngx_int_t ngx_pfree(ngx_pool_t *pool, void *p)
if (p == l->alloc) {
ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, pool->log, 0,
"free: %p", l->alloc);
- free(l->alloc);
+ ngx_free(l->alloc);
l->alloc = NULL;
return NGX_OK;
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 4c21fa61c..dd6d06afb 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -86,7 +86,7 @@ u_char *ngx_snprintf(u_char *buf, size_t max, const char *fmt, ...)
u_char *ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args)
{
- u_char *p, zero, *last, temp[NGX_MAX_INT_LEN];
+ u_char *p, zero, *last, temp[NGX_INT64_LEN];
int d;
size_t len;
uint32_t ui32;
@@ -120,7 +120,7 @@ u_char *ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args)
sign = 1;
hexadecimal = 0;
- p = temp + NGX_MAX_INT_LEN;
+ p = temp + NGX_INT64_LEN;
while (*fmt >= '0' && *fmt <= '9') {
width = width * 10 + *fmt++ - '0';
@@ -337,13 +337,13 @@ u_char *ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args)
} while (ui64 /= 10);
}
- len = (temp + NGX_MAX_INT_LEN) - p;
+ len = (temp + NGX_INT64_LEN) - p;
while (len++ < width && buf < last) {
*buf++ = zero;
}
- len = (temp + NGX_MAX_INT_LEN) - p;
+ len = (temp + NGX_INT64_LEN) - p;
if (buf + len > last) {
len = last - buf;
}
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h
index 51e0fd027..d0b87e0e3 100644
--- a/src/core/ngx_string.h
+++ b/src/core/ngx_string.h
@@ -22,6 +22,9 @@ typedef struct {
#define ngx_null_string { 0, NULL }
+#define ngx_tolower(c) (u_char) ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c)
+
+
#if (NGX_WIN32)
#define ngx_strncasecmp(s1, s2, n) \
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index 5ca235ccf..234a8aead 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -41,7 +41,7 @@ static ngx_mutex_t *ngx_time_mutex;
#endif
-#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE))
+#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
volatile time_t *ngx_cached_time;
static time_t cached_time[NGX_TIME_SLOTS];
@@ -84,7 +84,7 @@ void ngx_time_init()
ngx_cached_http_time.len = sizeof("Mon, 28 Sep 1970 06:00:00 GMT") - 1;
ngx_cached_http_log_time.len = sizeof("28/Sep/1970:12:00:00 +0600") - 1;
-#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE))
+#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
ngx_cached_time = &cached_time[0];
#endif
@@ -137,7 +137,7 @@ void ngx_time_update(time_t s)
slot++;
}
-#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE))
+#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
ngx_cached_time = &cached_time[slot];
#endif
diff --git a/src/core/ngx_times.h b/src/core/ngx_times.h
index 5eabac536..17ffc43da 100644
--- a/src/core/ngx_times.h
+++ b/src/core/ngx_times.h
@@ -22,7 +22,7 @@ void ngx_gmtime(time_t t, ngx_tm_t *tp);
ngx_int_t ngx_time_mutex_init(ngx_log_t *log);
#endif
-#if (NGX_THREADS && (TIME_T_SIZE > SIG_ATOMIC_T_SIZE))
+#if (NGX_THREADS && (NGX_TIME_T_SIZE > NGX_SIG_ATOMIC_T_SIZE))
#define ngx_time() *ngx_cached_time
extern volatile time_t *ngx_cached_time;