From 5518aba253096193df31b0f64e7461d1ac224dfd Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 17 Dec 2002 15:48:27 +0000 Subject: nginx-0.0.1-2002-12-17-18:48:27 import --- src/core/ngx_config.h | 9 ++++++--- src/core/ngx_sendfile.c | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h index cc650c1f0..2582ddae3 100644 --- a/src/core/ngx_config.h +++ b/src/core/ngx_config.h @@ -107,6 +107,7 @@ #define HAVE_INHERITED_NONBLOCK 1 #endif +/* FreeBSD sendfile */ #if __FreeBSD_version >= 300007 #ifndef HAVE_FREEBSD_SENDFILE @@ -117,8 +118,9 @@ #define HAVE_FREEBSD_SENDFILE_NBYTES_BUG 2 #endif -#endif +#endif /* FreeBSD sendfile */ +/* FreeBSD sendfile nbytes bug */ #if (__FreeBSD__ == 4 && __FreeBSD_version >= 460100) \ || __FreeBSD_version == 460001 || __FreeBSD_version >= 500029 @@ -127,13 +129,14 @@ #define HAVE_FREEBSD_SENDFILE_NBYTES_BUG 0 #endif -#endif +#endif /* FreeBSD sendfile nbytes bug */ #if (HAVE_FREEBSD_SENDFILE) #define HAVE_SENDFILE 1 #endif +/* FreeBSD kqueue */ #if (__FreeBSD__ == 4 && __FreeBSD_version >= 410000) \ || __FreeBSD_version >= 500011 @@ -142,7 +145,7 @@ #include #endif -#endif +#endif /* FreeBSD kqueue */ #endif /* __FreeBSD__ */ diff --git a/src/core/ngx_sendfile.c b/src/core/ngx_sendfile.c index bffd29c0c..e930fe53b 100644 --- a/src/core/ngx_sendfile.c +++ b/src/core/ngx_sendfile.c @@ -1,5 +1,8 @@ #include + +#if !(HAVE_SENDFILE) + #include #include #include @@ -18,3 +21,5 @@ int ngx_sendfile(ngx_socket_t s, return NGX_ERROR; } + +#endif -- cgit