mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
nginx-0.0.1-2002-12-19-20:49:51 import
This commit is contained in:
parent
8809257531
commit
fcd21fe0a2
@ -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>
|
||||
|
@ -22,7 +22,7 @@ ngx_event_t *ngx_read_events, *ngx_write_events;
|
||||
|
||||
#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;
|
||||
|
@ -22,11 +22,11 @@ int ngx_http_log_handler(ngx_http_request_t *r)
|
||||
|
||||
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 @@ int ngx_http_log_handler(ngx_http_request_t *r)
|
||||
|
||||
*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;
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_files.h>
|
||||
#include <ngx_string.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_file.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_ */
|
||||
|
@ -11,6 +11,7 @@ typedef long time_t;
|
||||
|
||||
#define QD_FMT "%I64d"
|
||||
#define QX_FMT "%I64x"
|
||||
#define OFF_FMT "%I64d"
|
||||
|
||||
|
||||
#endif /* _NGX_TYPES_H_INCLUDED_ */
|
||||
|
Loading…
Reference in New Issue
Block a user