aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-23 13:10:10 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-23 13:10:10 +0000
commitabeb122d6e447f03be252094e857bf6d5611de19 (patch)
tree2c02436c62314dd4e47682f80970ed6f7507b73a /src/core
parent73c80d82c1c7c1e8f1eb416ed378a2d541c9675b (diff)
downloadnginx-abeb122d6e447f03be252094e857bf6d5611de19.tar.gz
nginx-abeb122d6e447f03be252094e857bf6d5611de19.zip
APOP
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_config.h2
-rw-r--r--src/core/ngx_file.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 6078d89c7..ef31be538 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -49,6 +49,8 @@
#define ngx_signal_helper(n) SIG##n
#define ngx_signal_value(n) ngx_signal_helper(n)
+#define ngx_random random
+
/* TODO: #ifndef */
#define NGX_SHUTDOWN_SIGNAL QUIT
#define NGX_TERMINATE_SIGNAL TERM
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index f6bf04b03..e74c1aeab 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -9,7 +9,7 @@
static ngx_atomic_uint_t ngx_temp_number;
-static ngx_atomic_uint_t ngx_random;
+static ngx_atomic_uint_t ngx_random_number;
ssize_t
@@ -216,7 +216,7 @@ void
ngx_init_temp_number(void)
{
ngx_temp_number = 0;
- ngx_random = 123456;
+ ngx_random_number = 123456;
}
@@ -224,7 +224,7 @@ ngx_atomic_uint_t
ngx_next_temp_number(ngx_uint_t collision)
{
if (collision) {
- ngx_temp_number += ngx_random;
+ ngx_temp_number += ngx_random_number;
}
return ngx_temp_number++;