nginx-0.0.1-2003-11-12-01:16:11 import

This commit is contained in:
Igor Sysoev 2003-11-11 22:16:11 +00:00
parent 27c30f9919
commit d0d57b769e
8 changed files with 21 additions and 13 deletions

View File

@ -18,7 +18,12 @@ time_t ngx_time()
}
/* TODO: remove strftime() */
/* TODO:
* cache ngx_tm_t
* write own gmtime()
* remove strftime()
* we can remove localtime_r
*/
void ngx_time_update()
{

View File

@ -164,6 +164,7 @@ static int ngx_iocp_process_events(ngx_log_t *log)
ngx_err_t err;
ngx_msec_t timer;
ngx_event_t *ev;
struct timeval tv;
ngx_epoch_msec_t delta;
ngx_event_ovlp_t *ovlp;

View File

@ -5,6 +5,13 @@
#include <md5.h>
/* STUB */
#if (WIN32)
#define MD5Init MD5_Init
#define MD5Update MD5_Update
#define MD5Final MD5_Final
#endif
int ngx_http_cache_get_file(ngx_http_request_t *r, ngx_http_cache_ctx_t *ctx)
{

View File

@ -287,13 +287,10 @@ static int ngx_http_header_filter(ngx_http_request_t *r)
if (r->headers_out.content_type && r->headers_out.content_type->value.len) {
h->last = ngx_cpymem(h->last, "Content-Type: ",
sizeof("Content-Type: ") - 1);
#if (NGX_HTTP_LOG_ALL_HEADERS_OUT)
p = h->last;
#endif
h->last = ngx_cpymem(h->last, r->headers_out.content_type->value.data,
r->headers_out.content_type->value.len);
#if (NGX_HTTP_LOG_ALL_HEADERS_OUT)
if (r->headers_out.charset.len) {
h->last = ngx_cpymem(h->last, "; charset=",
sizeof("; charset=") - 1);
@ -302,7 +299,6 @@ static int ngx_http_header_filter(ngx_http_request_t *r)
r->headers_out.content_type->value.len = h->last - p;
r->headers_out.content_type->value.data = p;
#endif
}
*(h->last++) = CR; *(h->last++) = LF;

View File

@ -52,6 +52,10 @@ int ngx_file_append_mode(ngx_fd_t fd);
#define ngx_close_file CloseHandle
#define ngx_close_file_n "CloseHandle()"
/* STUB */
#define ngx_rename_file MoveFile
#define ngx_rename_file_n "MoveFile()"
#define ngx_mkdir(name) CreateDirectory(name, NULL)
#define ngx_mkdir_n "CreateDirectory()"

View File

@ -24,6 +24,6 @@ void ngx_gettimeofday(struct timeval *tp)
intervals = ((uint64_t) ft.dwHighDateTime << 32) | ft.dwLowDateTime;
intervals -= 116444736000000000;
tp->tv_sec = intervals / 10000000;
tp->tv_usec = (intervals % 10000000) / 10;
tp->tv_sec = (long) (intervals / 10000000);
tp->tv_usec = (long) ((intervals % 10000000) / 10);
}

View File

@ -27,12 +27,6 @@ typedef FILETIME ngx_mtime_t;
#define ngx_localtime GetLocalTime
struct timeval {
long tv_sec;
long tv_usec;
};
void ngx_gettimeofday(struct timeval *tp);

View File

@ -36,6 +36,7 @@ typedef unsigned __int64 off_t;
#define SIZE_FMT "%d"
#define SIZEX_FMT "%x"
#define PID_FMT "%d"
#define TIME_FMT "%lu"
/* STUB */