aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior2014-01-18 21:24:58 +0100
committerJason A. Donenfeld2014-01-19 15:08:49 +0100
commitd3581b58890389794de5d5222c91a0129873e95c (patch)
tree95c4010b61869934cca86c5ac23056463754f2ee /Makefile
parentea7210bef377be4ffb088a1a8e5a9dd354f82afb (diff)
downloadcgit-d3581b58890389794de5d5222c91a0129873e95c.tar.gz
cgit-d3581b58890389794de5d5222c91a0129873e95c.tar.bz2
cgit-d3581b58890389794de5d5222c91a0129873e95c.zip
cache: use sendfile() instead of a pair of read() + write()
sendfile() does the same job and avoids to copy the content into userland and back. One has to define NO_SENDFILE in case the OS (kernel / libc) does not supported. It is disabled by default on non-linux environemnts. According to the glibc, sendfile64() was added in Linux 2.4 (so it has been there for a while) but after browsing over the mapage of FreeBSD's I noticed that the prototype is little different. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2dc92df..05b97d7 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT))
29# j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). 29# j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
30# some C compilers supported these specifiers prior to C99 as an extension. 30# some C compilers supported these specifiers prior to C99 as an extension.
31# 31#
32# Define HAVE_LINUX_SENDFILE to use sendfile()
32 33
33#-include config.mak 34#-include config.mak
34 35