summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-12-15 21:08:04 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-12-15 21:08:04 +0000
commit5eef618ed671c55bc1244652cb49afef224c833c (patch)
tree593b11f615eb39e824c8e8d45ada176ae264de0d /src/core
parent6e4bca966e723a2162a0f183f4f520115e0fba32 (diff)
downloadnginx-5eef618ed671c55bc1244652cb49afef224c833c.tar.gz
nginx-5eef618ed671c55bc1244652cb49afef224c833c.tar.bz2
nginx-0.0.1-2002-12-16-00:08:04 import
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_config.h4
-rw-r--r--src/core/ngx_connection.h3
-rw-r--r--src/core/ngx_log.c2
-rw-r--r--src/core/ngx_sendfile.c20
-rw-r--r--src/core/ngx_sendfile.h20
5 files changed, 47 insertions, 2 deletions
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 09f73eb34..cc650c1f0 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -80,6 +80,10 @@
#define CRLF "\x0d\x0a"
+#ifndef INET_ADDRSTRLEN
+#define INET_ADDRSTRLEN 16
+#endif
+
#if defined SO_ACCEPTFILTER || defined TCP_DEFER_ACCEPT
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 0ff09ffdf..1c19aa374 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -3,8 +3,9 @@
#include <ngx_socket.h>
#include <ngx_log.h>
-#include <ngx_hunk.h>
#include <ngx_alloc.h>
+#include <ngx_hunk.h>
+#include <ngx_array.h>
#include <ngx_string.h>
#include <ngx_server.h>
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index 78459e348..244edc33e 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -38,7 +38,7 @@ void ngx_log_error_core(int level, ngx_log_t *log, ngx_err_t err,
ngx_localtime(&tm);
len = ngx_snprintf(errstr, sizeof(errstr), "%4d/%02d/%02d %02d:%02d:%02d",
- tm.ngx_tm_year + 1900, tm.ngx_tm_mon, tm.ngx_tm_mday,
+ tm.ngx_tm_year, tm.ngx_tm_mon, tm.ngx_tm_mday,
tm.ngx_tm_hour, tm.ngx_tm_min, tm.ngx_tm_sec);
len += ngx_snprintf(errstr + len, sizeof(errstr) - len - 1,
diff --git a/src/core/ngx_sendfile.c b/src/core/ngx_sendfile.c
new file mode 100644
index 000000000..bffd29c0c
--- /dev/null
+++ b/src/core/ngx_sendfile.c
@@ -0,0 +1,20 @@
+
+#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,
+ ngx_iovec_t *headers, int hdr_cnt,
+ 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_error(NGX_LOG_INFO, log, 0,
+ "ngx_sendfile: sendfile is not implemented");
+
+
+ return NGX_ERROR;
+}
diff --git a/src/core/ngx_sendfile.h b/src/core/ngx_sendfile.h
new file mode 100644
index 000000000..a80750bef
--- /dev/null
+++ b/src/core/ngx_sendfile.h
@@ -0,0 +1,20 @@
+#ifndef _NGX_SENDFILE_H_INCLUDED_
+#define _NGX_SENDFILE_H_INCLUDED_
+
+
+#include <ngx_config.h>
+#include <ngx_types.h>
+#include <ngx_files.h>
+#include <ngx_socket.h>
+#include <ngx_log.h>
+#include <ngx_sendv.h>
+
+int ngx_sendfile(ngx_socket_t s,
+ ngx_iovec_t *headers, int hdr_cnt,
+ ngx_fd_t fd, off_t offset, size_t nbytes,
+ ngx_iovec_t *trailers, int trl_cnt,
+ off_t *sent,
+ ngx_log_t *log);
+
+
+#endif /* _NGX_SENDFILE_H_INCLUDED_ */