comparison src/os/unix/ngx_freebsd_init.c @ 195:8dee38ea9117

nginx-0.0.1-2003-11-25-23:44:56 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 25 Nov 2003 20:44:56 +0000
parents 4c698194c56d
children 11fbd0fc041d
comparison
equal deleted inserted replaced
194:2357fa41738a 195:8dee38ea9117
18 18
19 ngx_os_io_t ngx_os_io = { 19 ngx_os_io_t ngx_os_io = {
20 ngx_unix_recv, 20 ngx_unix_recv,
21 ngx_readv_chain, 21 ngx_readv_chain,
22 NULL, 22 NULL,
23 #if (HAVE_FREEBSD_SENDFILE) 23 #if (HAVE_SENDFILE)
24 ngx_freebsd_sendfile_chain, 24 ngx_freebsd_sendfile_chain,
25 NGX_HAVE_SENDFILE|NGX_HAVE_ZEROCOPY 25 NGX_HAVE_SENDFILE
26 #else 26 #else
27 ngx_writev_chain, 27 ngx_writev_chain,
28 NULL 28 0
29 #endif 29 #endif
30 }; 30 };
31 31
32 32
33 typedef struct { 33 typedef struct {
95 ngx_log_error(NGX_LOG_INFO, log, 0, 95 ngx_log_error(NGX_LOG_INFO, log, 0,
96 "kern.osreldate: %d, built on %d", 96 "kern.osreldate: %d, built on %d",
97 version, __FreeBSD_version); 97 version, __FreeBSD_version);
98 98
99 99
100 #if (HAVE_FREEBSD_SENDFILE) 100 #if (HAVE_SENDFILE)
101 101
102 /* 102 /*
103 * The determination of the sendfile() nbytes bug is complex enough. 103 * The determination of the sendfile() nbytes bug is complex enough.
104 * There are two sendfile() syscalls: a new 393 has no bug while 104 * There are two sendfile() syscalls: a new 393 has no bug while
105 * an old 336 has the bug in some versions and has not in others. 105 * an old 336 has the bug in some versions and has not in others.
125 125
126 ngx_freebsd_sendfile_nbytes_bug = 1; 126 ngx_freebsd_sendfile_nbytes_bug = 1;
127 127
128 #endif 128 #endif
129 129
130 #endif /* HAVE_FREEBSD_SENDFILE */ 130 #endif /* HAVE_SENDFILE */
131 131
132 132
133 if ((version < 500000 && version >= 440003) || version >= 500017) { 133 if ((version < 500000 && version >= 440003) || version >= 500017) {
134 ngx_freebsd_use_tcp_nopush = 1; 134 ngx_freebsd_use_tcp_nopush = 1;
135 } 135 }