comparison src/os/unix/ngx_linux_sendfile_chain.c @ 199:a65b630b3a66

nginx-0.0.1-2003-11-28-11:40:40 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 28 Nov 2003 08:40:40 +0000
parents 34995c5ec6c4
children 267ea1d98683
comparison
equal deleted inserted replaced
198:34995c5ec6c4 199:a65b630b3a66
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 #include <ngx_event.h> 4 #include <ngx_event.h>
5
6
7 /*
8 * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit
9 * offsets only and the including <sys/sendfile.h> breaks building
10 * if off_t is 64 bit wide. So we use own sendfile() definition where
11 * offset paramter is int32_t. It allows to use sendfile() with
12 * the file parts below 2G.
13 *
14 * Linux 2.4.21 has a new sendfile64() syscall #239.
15 */
5 16
6 17
7 ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in) 18 ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in)
8 { 19 {
9 int rc; 20 int rc;