summaryrefslogtreecommitdiffhomepage
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/ngx_sendfile.c (renamed from src/os/unix/ngx_sendfile.h)17
-rw-r--r--src/core/ngx_sendfile.h (renamed from src/os/win32/ngx_sendfile.h)0
-rw-r--r--src/os/unix/ngx_time.c2
-rw-r--r--src/os/win32/ngx_files.h3
4 files changed, 14 insertions, 8 deletions
diff --git a/src/os/unix/ngx_sendfile.h b/src/core/ngx_sendfile.c
index c9a59235f..bffd29c0c 100644
--- a/src/os/unix/ngx_sendfile.h
+++ b/src/core/ngx_sendfile.c
@@ -1,11 +1,8 @@
-#ifndef _NGX_SENDFILE_H_INCLUDED_
-#define _NGX_SENDFILE_H_INCLUDED_
-
-#include <ngx_types.h>
-#include <ngx_files.h>
-#include <ngx_socket.h>
+#include <ngx_config.h>
+#include <ngx_core.h>
#include <ngx_log.h>
+#include <ngx_socket.h>
#include <ngx_sendv.h>
int ngx_sendfile(ngx_socket_t s,
@@ -13,7 +10,11 @@ int ngx_sendfile(ngx_socket_t s,
ngx_fd_t fd, off_t offset, size_t nbytes,
ngx_iovec_t *trailers, int trl_cnt,
off_t *sent,
- ngx_log_t *log);
+ ngx_log_t *log)
+{
+ ngx_log_error(NGX_LOG_INFO, log, 0,
+ "ngx_sendfile: sendfile is not implemented");
-#endif /* _NGX_SENDFILE_H_INCLUDED_ */
+ return NGX_ERROR;
+}
diff --git a/src/os/win32/ngx_sendfile.h b/src/core/ngx_sendfile.h
index a80750bef..a80750bef 100644
--- a/src/os/win32/ngx_sendfile.h
+++ b/src/core/ngx_sendfile.h
diff --git a/src/os/unix/ngx_time.c b/src/os/unix/ngx_time.c
index 5dfcb63f2..26ef6462d 100644
--- a/src/os/unix/ngx_time.c
+++ b/src/os/unix/ngx_time.c
@@ -6,6 +6,8 @@ void ngx_localtime(ngx_tm_t *tm)
{
time_t clock = time(NULL);
localtime_r(&clock, tm);
+ tm->ngx_tm_mon++;
+ tm->ngx_tm_year += 1900;
}
u_int ngx_msec(void)
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h
index 8cd58efc7..f5e50cc9f 100644
--- a/src/os/win32/ngx_files.h
+++ b/src/os/win32/ngx_files.h
@@ -22,7 +22,10 @@ typedef BY_HANDLE_FILE_INFORMATION ngx_file_info_t;
#define ngx_open_file(name, flags) \
CreateFile(name, flags, \
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, \
+ NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL)
+/*
NULL, OPEN_EXISTING, 0, NULL)
+*/
#define ngx_open_file_n "CreateFile()"