nginx-0.0.7-2004-06-16-19:32:11 import
diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c
index 90973a6..9c5266a 100644
--- a/src/core/ngx_buf.c
+++ b/src/core/ngx_buf.c
@@ -84,7 +84,8 @@
}
-int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in)
+ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
+ ngx_chain_t *in)
{
ngx_chain_t *cl, **ll;
diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h
index bfae4ac..301d8f7 100644
--- a/src/core/ngx_buf.h
+++ b/src/core/ngx_buf.h
@@ -170,10 +170,11 @@
last = &cl->next
-int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in);
-int ngx_chain_writer(void *data, ngx_chain_t *in);
+ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in);
+ngx_int_t ngx_chain_writer(void *data, ngx_chain_t *in);
-int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in);
+ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
+ ngx_chain_t *in);
void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy,
ngx_chain_t **out, ngx_buf_tag_t tag);
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index 4b9fd90..ec61e94 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -90,15 +90,15 @@
struct ngx_module_s {
- int ctx_index;
- int index;
+ ngx_uint_t ctx_index;
+ ngx_uint_t index;
void *ctx;
ngx_command_t *commands;
- int type;
- int (*init_module)(ngx_cycle_t *cycle);
- int (*init_process)(ngx_cycle_t *cycle);
+ ngx_uint_t type;
+ ngx_int_t (*init_module)(ngx_cycle_t *cycle);
+ ngx_int_t (*init_process)(ngx_cycle_t *cycle);
#if 0
- int (*init_thread)(ngx_cycle_t *cycle);
+ ngx_int_t (*init_thread)(ngx_cycle_t *cycle);
#endif
};
@@ -113,7 +113,7 @@
typedef struct {
ngx_file_t file;
ngx_buf_t *buffer;
- int line;
+ ngx_uint_t line;
} ngx_conf_file_t;
@@ -131,8 +131,8 @@
ngx_log_t *log;
void *ctx;
- int module_type;
- int cmd_type;
+ ngx_uint_t module_type;
+ ngx_uint_t cmd_type;
ngx_conf_handler_pt handler;
char *handler_conf;
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 57039b9..465e1bf 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -31,12 +31,6 @@
#endif
-/* STUB: autoconf */
-typedef int ngx_int_t;
-typedef u_int ngx_uint_t;
-typedef int ngx_flag_t;
-
-
#if !(WIN32)
#define ngx_signal_helper(n) SIG##n
@@ -58,6 +52,26 @@
#define NGX_INVALID_ARRAY_INDEX 0x80000000
+#if 1
+/* STUB: autoconf */
+typedef int ngx_int_t;
+typedef u_int ngx_uint_t;
+typedef int ngx_flag_t;
+#define NGX_INT_T_LEN sizeof("-2147483648") - 1
+#define NGX_INT_T_FMT "d"
+#define NGX_UINT_T_FMT "u"
+
+#else
+
+typedef long ngx_int_t;
+typedef u_long ngx_uint_t;
+typedef long ngx_flag_t;
+#define NGX_INT_T_LEN sizeof("-9223372036854775808") - 1
+#define NGX_INT_T_FMT "lld"
+#define NGX_UINT_T_FMT "llu"
+
+#endif
+
/* TODO: auto */
#define NGX_INT32_LEN sizeof("-2147483648") - 1
#define NGX_INT64_LEN sizeof("-9223372036854775808") - 1
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 8dbc4e4..67275bd 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -97,7 +97,7 @@
ngx_buf_t *buffer;
- ngx_int_t number;
+ ngx_uint_t number;
unsigned log_error:2; /* ngx_connection_log_error_e */
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 5ea4fd9..7ab202c 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -7,13 +7,13 @@
#define NGX_NONE 1
-ngx_inline static int ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx,
- ngx_buf_t *buf);
+ngx_inline static ngx_int_t
+ ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx, ngx_buf_t *buf);
static ngx_int_t ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src,
ngx_uint_t sendfile);
-int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
+ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
{
int rc, last;
size_t size, bsize;
@@ -168,8 +168,8 @@
}
-ngx_inline static int ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx,
- ngx_buf_t *buf)
+ngx_inline static ngx_int_t
+ ngx_output_chain_need_to_copy(ngx_output_chain_ctx_t *ctx, ngx_buf_t *buf)
{
if (ngx_buf_special(buf)) {
return 0;