nginx-0.1.22-RELEASE import

    *) Bugfix: the ngx_http_stub_status_module showed incorrect handled
       connections statistics if the proxying or FastCGI server were used.

    *) Bugfix: the installation paths were incorrectly quoted on Linux and
       Solaris; the bug had appeared in 0.1.21.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 5c41207..073d682 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.21"
+#define NGINX_VER          "nginx/0.1.22"
 
 #define NGINX_VAR          "NGINX"
 #define NGX_NEWPID_EXT     ".newbin"
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 4d5d0c8..eed955a 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -114,7 +114,7 @@
 
     ngx_buf_t          *buffer;
 
-    ngx_atomic_int_t    number;
+    ngx_atomic_uint_t   number;
 
     unsigned            log_error:2;     /* ngx_connection_log_error_e */
 
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index e06b8ca..514479c 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -8,8 +8,8 @@
 #include <ngx_core.h>
 
 
-static ngx_atomic_int_t  ngx_temp_number;
-static ngx_atomic_int_t  ngx_random;
+static ngx_atomic_uint_t  ngx_temp_number;
+static ngx_atomic_uint_t  ngx_random;
 
 
 ssize_t
@@ -38,8 +38,8 @@
 ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, ngx_pool_t *pool,
     int persistent)
 {
-    ngx_err_t          err;
-    ngx_atomic_int_t   n;
+    ngx_err_t           err;
+    ngx_atomic_uint_t   n;
 
     file->name.len = path->name.len + 1 + path->len + NGX_ATOMIC_T_LEN;
 
@@ -176,7 +176,7 @@
 }
 
 
-ngx_atomic_int_t
+ngx_atomic_uint_t
 ngx_next_temp_number(ngx_uint_t collision)
 {
     if (collision) {
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
index a76a648..f7832d7 100644
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -62,7 +62,7 @@
 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user);
 
 void ngx_init_temp_number();
-ngx_atomic_int_t ngx_next_temp_number(ngx_uint_t collision);
+ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision);
 
 char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
 
diff --git a/src/core/ngx_log.h b/src/core/ngx_log.h
index 95dfe41..48449a7 100644
--- a/src/core/ngx_log.h
+++ b/src/core/ngx_log.h
@@ -47,7 +47,7 @@
     ngx_uint_t           log_level;
     ngx_open_file_t     *file;
 
-    ngx_atomic_int_t     connection;
+    ngx_atomic_uint_t    connection;
 
     ngx_log_handler_pt   handler;
     void                *data;
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index ca9d669..fdb59fd 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -54,7 +54,7 @@
  *    %[0][width|m][u][x|X]i    ngx_int_t/ngx_uint_t
  *    %[0][width][u][x|X]D      int32_t/uint32_t
  *    %[0][width][u][x|X]L      int64_t/uint64_t
- *    %[0][width|m][u][x|X]A    ngx_atomic_int_t
+ *    %[0][width|m][u][x|X]A    ngx_atomic_int_t/ngx_atomic_uint_t
  *    %P                        ngx_pid_t
  *    %r                        rlim_t
  *    %p                        pointer
@@ -277,7 +277,7 @@
                 if (sign) {
                     i64 = (int64_t) va_arg(args, ngx_atomic_int_t);
                 } else {
-                    ui64 = (uint64_t) va_arg(args, ngx_atomic_int_t);
+                    ui64 = (uint64_t) va_arg(args, ngx_atomic_uint_t);
                 }
 
                 if (max_width) {