mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 01:42:58 +08:00
nginx-0.0.1-2003-11-12-01:16:11 import
This commit is contained in:
parent
27c30f9919
commit
d0d57b769e
@ -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()
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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()"
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user