Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_freebsd_init.c @ 142:cb77c084acdb
nginx-0.0.1-2003-10-09-11:00:45 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 09 Oct 2003 07:00:45 +0000 |
parents | 2e069b6e6920 |
children | 5526213be452 |
comparison
equal
deleted
inserted
replaced
141:656d468f4ead | 142:cb77c084acdb |
---|---|
91 version, __FreeBSD_version); | 91 version, __FreeBSD_version); |
92 | 92 |
93 | 93 |
94 #if (HAVE_FREEBSD_SENDFILE) | 94 #if (HAVE_FREEBSD_SENDFILE) |
95 | 95 |
96 /* The determination of the sendfile() nbytes bug is complex enough. | 96 /* |
97 There're two sendfile() syscalls: a new 393 has no bug while | 97 * The determination of the sendfile() nbytes bug is complex enough. |
98 an old 336 has the bug in some versions and has not in others. | 98 * There're two sendfile() syscalls: a new 393 has no bug while |
99 Besides libc_r wrapper also emulates the bug in some versions. | 99 * an old 336 has the bug in some versions and has not in others. |
100 There's no way to say exactly if a given FreeBSD version has bug. | 100 * Besides libc_r wrapper also emulates the bug in some versions. |
101 Here is the algorithm that works at least for RELEASEs | 101 * There's no way to say exactly if a given FreeBSD version has the bug. |
102 and for syscalls only (not libc_r wrapper). */ | 102 * Here is the algorithm that works at least for RELEASEs |
103 | 103 * and for syscalls only (not libc_r wrapper). |
104 /* detect the new sendfile() version available at the compile time | 104 * |
105 to allow an old binary to run correctly on an updated FreeBSD system. */ | 105 * We detect the new sendfile() version available at the compile time |
106 * to allow an old binary to run correctly on an updated FreeBSD system. | |
107 */ | |
106 | 108 |
107 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 460102) \ | 109 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 460102) \ |
108 || __FreeBSD_version == 460002 || __FreeBSD_version >= 500039 | 110 || __FreeBSD_version == 460002 || __FreeBSD_version >= 500039 |
109 | 111 |
110 /* a new syscall without the bug */ | 112 /* a new syscall without the bug */ |
113 | |
111 ngx_freebsd_sendfile_nbytes_bug = 0; | 114 ngx_freebsd_sendfile_nbytes_bug = 0; |
112 | 115 |
113 #else | 116 #else |
114 | 117 |
115 /* an old syscall that can have the bug */ | 118 /* an old syscall that can have the bug */ |
119 | |
116 ngx_freebsd_sendfile_nbytes_bug = 1; | 120 ngx_freebsd_sendfile_nbytes_bug = 1; |
117 | 121 |
118 #endif | 122 #endif |
119 | 123 |
120 #endif /* HAVE_FREEBSD_SENDFILE */ | 124 #endif /* HAVE_FREEBSD_SENDFILE */ |