nginx-0.0.1-2002-12-19-20:49:51 import
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h index 2582dda..66199de 100644 --- a/src/core/ngx_config.h +++ b/src/core/ngx_config.h
@@ -52,6 +52,23 @@ #else /* POSIX */ + + +/* Solaris */ +#if defined(sun) && (defined(__svr4__) || defined(__SVR4)) + +#define SOLARIS 1 + +#define _FILE_OFFSET_BITS 64 /* should be before sys/types.h */ + +#ifndef HAVE_INHERITED_NONBLOCK +#define HAVE_INHERITED_NONBLOCK 1 +#endif + +#endif /* Solaris */ + + + #include <unistd.h> #include <stddef.h> /* offsetof */ #include <stdlib.h>
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 8517e64..763b8f8 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c
@@ -22,7 +22,7 @@ #if !(USE_KQUEUE) -#if 0 +#if 1 ngx_event_type_e ngx_event_type = NGX_SELECT_EVENT; #else ngx_event_type_e ngx_event_type = NGX_KQUEUE_EVENT;
diff --git a/src/http/modules/ngx_http_log_handler.c b/src/http/modules/ngx_http_log_handler.c index b2f0e0d..1cac974 100644 --- a/src/http/modules/ngx_http_log_handler.c +++ b/src/http/modules/ngx_http_log_handler.c
@@ -22,11 +22,11 @@ ngx_log_debug(r->connection->log, "log handler"); - /* %a, 20:%c, 22:%d, 3:%s, 20:%b, 5*" ", "2/1: "\r\n" */ + /* 10:%con, 22:%date, 2:%"%r", 3:%status, 20:%bytes, 5*" ", 2/1: "\r\n" */ #if (WIN32) - len = 2 + 20 + 22 + 3 + 20 + 5 + + 2; + len = 10 + 22 + 2 + 3 + 20 + 5 + 2; #else - len = 2 + 20 + 22 + 3 + 20 + 5 + + 1; + len = 10 + 22 + 2 + 3 + 20 + 5 + 1; #endif len += r->connection->addr_text.len; @@ -67,7 +67,7 @@ *p++ = ' '; - p += ngx_snprintf(p, 21, QD_FMT, r->connection->sent); + p += ngx_snprintf(p, 21, OFF_FMT, r->connection->sent); #if (WIN32) *p++ = CR; *p++ = LF;
diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c index e16c1f7..8c374cb 100644 --- a/src/http/ngx_http_output_filter.c +++ b/src/http/ngx_http_output_filter.c
@@ -1,4 +1,5 @@ +#include <ngx_config.h> #include <ngx_core.h> #include <ngx_files.h> #include <ngx_string.h>
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index 5058bac..7a5caa5 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c
@@ -1,4 +1,5 @@ +#include <ngx_config.h> #include <ngx_core.h> #include <ngx_file.h>
diff --git a/src/os/unix/ngx_types.h b/src/os/unix/ngx_types.h index ba00950..9919e90 100644 --- a/src/os/unix/ngx_types.h +++ b/src/os/unix/ngx_types.h
@@ -5,8 +5,19 @@ #include <ngx_config.h> -#define QD_FMT "%qd" -#define QX_FMT "%qx" +#ifdef SOLARIS + +#define QD_FMT "%lld" +#define QX_FMT "%llx" +#define OFF_FMT "%lld" + +#else + +#define QD_FMT "%qd" +#define QX_FMT "%qx" +#define OFF_FMT "%qd" + +#endif #endif /* _NGX_TYPES_H_INCLUDED_ */
diff --git a/src/os/win32/ngx_types.h b/src/os/win32/ngx_types.h index 7521633..0b51383 100644 --- a/src/os/win32/ngx_types.h +++ b/src/os/win32/ngx_types.h
@@ -11,6 +11,7 @@ #define QD_FMT "%I64d" #define QX_FMT "%I64x" +#define OFF_FMT "%I64d" #endif /* _NGX_TYPES_H_INCLUDED_ */