Browse Source

test for posix_madvise

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@976 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 16 years ago
parent
commit
156c02a466
  1. 6
      configure.in
  2. 2
      src/network_writev.c

6
configure.in

@ -439,10 +439,13 @@ case $host_os in
* ) ;;
esac
dnl posix_* needs _XOPEN_SOURCE=600
CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
strdup strerror strstr strtol sendfile getopt socket \
gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
getuid select signal pathconf madvise\
getuid select signal pathconf madvise posix_fadvise posix_madvise \
writev sigaction sendfile64 send_file kqueue port_create localtime_r])
AC_MSG_CHECKING(for Large File System support)
@ -517,7 +520,6 @@ AC_CHECK_LIB(fcgi, FCGI_Accept, [
AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
if test "${GCC}" = "yes"; then
CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic"

2
src/network_writev.c

@ -255,7 +255,7 @@ int network_write_chunkqueue_writev(server *srv, connection *con, int fd, chunkq
#ifdef LOCAL_BUFFERING
buffer_copy_string_len(c->mem, c->file.mmap.start, c->file.mmap.length);
#else
#ifdef HAVE_MADVISE
#ifdef HAVE_POSIX_MADVISE
/* don't advise files < 64Kb */
if (c->file.mmap.length > (64 KByte)) {
/* darwin 7 is returning EINVAL all the time and I don't know how to

Loading…
Cancel
Save