diff options
Diffstat (limited to 'auto')
-rw-r--r-- | auto/sendfile | 56 | ||||
-rw-r--r-- | auto/sources | 1 |
2 files changed, 33 insertions, 24 deletions
diff --git a/auto/sendfile b/auto/sendfile index e5bf3b79..a065f7b6 100644 --- a/auto/sendfile +++ b/auto/sendfile @@ -46,7 +46,7 @@ if [ $nxt_found = no ]; then int main() { off_t sent; - sendfile(-1, -1, 0, 0, NULL, &sent, SF_NODISKIO); + sendfile(-1, -1, 0, 0, NULL, &sent, 0); return 0; }" . auto/feature @@ -57,55 +57,63 @@ if [ $nxt_found = no ]; then fi -NXT_LIBSENDFILE= - if [ $nxt_found = no ]; then - # Solaris 8 sendfilev(). + # MacOSX sendfile(). - nxt_feature="Solaris sendfilev()" - nxt_feature_name=NXT_HAVE_SOLARIS_SENDFILEV - nxt_feature_libs="-lsendfile" - nxt_feature_test="#include <sys/sendfile.h> + nxt_feature="MacOSX sendfile()" + nxt_feature_name=NXT_HAVE_MACOSX_SENDFILE + nxt_feature_libs= + nxt_feature_test="#include <sys/types.h> + #include <sys/socket.h> + #include <sys/uio.h> + #include <stdlib.h> int main() { - size_t sent; - struct sendfilevec vec; + off_t sent; - sendfilev(-1, &vec, 0, &sent); + sendfile(-1, -1, 0, &sent, NULL, 0); return 0; }" . auto/feature if [ $nxt_found = yes ]; then - NXT_HAVE_SOLARIS_SENDFILEV=YES - NXT_LIBSENDFILE=$nxt_feature_libs + NXT_HAVE_MACOSX_SENDFILE=YES fi fi if [ $nxt_found = no ]; then + $echo + $echo "$0: error: no supported sendfile() found." + $echo + exit 1; +fi - # MacOSX sendfile(). - nxt_feature="MacOSX sendfile()" - nxt_feature_name=NXT_HAVE_MACOSX_SENDFILE - nxt_feature_libs= - nxt_feature_test="#include <sys/types.h> - #include <sys/socket.h> - #include <sys/uio.h> - #include <stdlib.h> +NXT_LIBSENDFILE= + +if [ $nxt_found = no ]; then + + # Solaris 8 sendfilev(). + + nxt_feature="Solaris sendfilev()" + nxt_feature_name=NXT_HAVE_SOLARIS_SENDFILEV + nxt_feature_libs="-lsendfile" + nxt_feature_test="#include <sys/sendfile.h> int main() { - off_t sent; + size_t sent; + struct sendfilevec vec; - sendfile(-1, -1, 0, &sent, NULL, 0); + sendfilev(-1, &vec, 0, &sent); return 0; }" . auto/feature if [ $nxt_found = yes ]; then - NXT_HAVE_MACOSX_SENDFILE=YES + NXT_HAVE_SOLARIS_SENDFILEV=YES + NXT_LIBSENDFILE=$nxt_feature_libs fi fi diff --git a/auto/sources b/auto/sources index 2283e543..c6b34bbc 100644 --- a/auto/sources +++ b/auto/sources @@ -87,6 +87,7 @@ NXT_LIB_SRCS=" \ src/nxt_http_error.c \ src/nxt_http_route.c \ src/nxt_http_route_addr.c \ + src/nxt_http_return.c \ src/nxt_http_static.c \ src/nxt_http_proxy.c \ src/nxt_application.c \ |