comparison src/os/unix/ngx_freebsd_init.c @ 88:e916a291e9aa NGINX_0_1_44

nginx 0.1.44 *) Feature: the IMAP/POP3 proxy supports SSL. *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module. *) Feature: the "userid_mark" directive. *) Feature: the $remote_user variable value is determined independently of authorization use.
author Igor Sysoev <http://sysoev.ru>
date Tue, 06 Sep 2005 00:00:00 +0400
parents 6ae11d59d10e
children ca4f70b3ccc6
comparison
equal deleted inserted replaced
87:5b7ec80c3c40 88:e916a291e9aa
25 25
26 ngx_uint_t ngx_freebsd_sendfile_nbytes_bug; 26 ngx_uint_t ngx_freebsd_sendfile_nbytes_bug;
27 ngx_uint_t ngx_freebsd_use_tcp_nopush; 27 ngx_uint_t ngx_freebsd_use_tcp_nopush;
28 28
29 29
30 ngx_os_io_t ngx_os_io = { 30 static ngx_os_io_t ngx_freebsd_io = {
31 ngx_unix_recv, 31 ngx_unix_recv,
32 ngx_readv_chain, 32 ngx_readv_chain,
33 ngx_unix_send, 33 ngx_unix_send,
34 #if (NGX_HAVE_SENDFILE) 34 #if (NGX_HAVE_SENDFILE)
35 ngx_freebsd_sendfile_chain, 35 ngx_freebsd_sendfile_chain,
72 72
73 { NULL, NULL, 0, 0 } 73 { NULL, NULL, 0, 0 }
74 }; 74 };
75 75
76 76
77 void ngx_debug_init() 77 void
78 ngx_debug_init()
78 { 79 {
79 #if (NGX_DEBUG && !NGX_NO_DEBUG_MALLOC) 80 #if (NGX_DEBUG && !NGX_NO_DEBUG_MALLOC)
80 81
81 #if __FreeBSD_version >= 500014 82 #if __FreeBSD_version >= 500014
82 _malloc_options = "J"; 83 _malloc_options = "J";
86 87
87 #endif 88 #endif
88 } 89 }
89 90
90 91
91 ngx_int_t ngx_os_init(ngx_log_t *log) 92 ngx_int_t
93 ngx_os_specific_init(ngx_log_t *log)
92 { 94 {
93 int version, somaxconn; 95 int version, somaxconn;
94 size_t size; 96 size_t size;
95 ngx_err_t err; 97 ngx_err_t err;
96 ngx_uint_t i; 98 ngx_uint_t i;
221 return NGX_ERROR; 223 return NGX_ERROR;
222 } 224 }
223 225
224 ngx_tcp_nodelay_and_tcp_nopush = 1; 226 ngx_tcp_nodelay_and_tcp_nopush = 1;
225 227
226 228 ngx_os_io = ngx_freebsd_io;
227 return ngx_posix_init(log); 229
230 return NGX_OK;
228 } 231 }
229 232
230 233
231 void ngx_os_status(ngx_log_t *log) 234 void
235 ngx_os_specific_status(ngx_log_t *log)
232 { 236 {
233 ngx_uint_t i; 237 ngx_uint_t i;
234 238
235 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", 239 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
236 ngx_freebsd_kern_ostype, ngx_freebsd_kern_osrelease); 240 ngx_freebsd_kern_ostype, ngx_freebsd_kern_osrelease);
249 if (sysctls[i].exists) { 253 if (sysctls[i].exists) {
250 ngx_log_error(NGX_LOG_NOTICE, log, 0, "%s: %d", 254 ngx_log_error(NGX_LOG_NOTICE, log, 0, "%s: %d",
251 sysctls[i].name, *sysctls[i].value); 255 sysctls[i].name, *sysctls[i].value);
252 } 256 }
253 } 257 }
254
255
256 ngx_posix_status(log);
257 } 258 }