OPTIM: splice: assume by default that splice is working correctly

Versions of splice between 2.6.25 and 2.6.27.12 were bogus and would return EAGAIN
on incoming shutdowns. On these versions, we have to call recv() after such a return
in order to find whether splice is OK or not. Since 2.6.27.13 we don't need to do
this anymore, saving one useless recv() call after each splice() returning EAGAIN,
and we can avoid this logic by defining ASSUME_SPLICE_WORKS.

Building with linux2628 automatically enables splice and the flag above since the
kernel is safe. People enabling splice for custom kernels will be able to disable
this logic by hand too.
diff --git a/Makefile b/Makefile
index fb6ce98..f1eed55 100644
--- a/Makefile
+++ b/Makefile
@@ -243,6 +243,7 @@
   USE_ACCEPT4     = implicit
   USE_FUTEX       = implicit
   USE_CPU_AFFINITY= implicit
+  ASSUME_SPLICE_WORKS= implicit
 else
 ifeq ($(TARGET),solaris)
   # This is for Solaris 8
@@ -449,6 +450,11 @@
 BUILD_OPTIONS  += $(call ignore_implicit,USE_MY_SPLICE)
 endif
 
+ifneq ($(ASSUME_SPLICE_WORKS),)
+OPTIONS_CFLAGS += -DASSUME_SPLICE_WORKS
+BUILD_OPTIONS  += $(call ignore_implicit,ASSUME_SPLICE_WORKS)
+endif
+
 ifneq ($(USE_ACCEPT4),)
 OPTIONS_CFLAGS += -DUSE_ACCEPT4
 BUILD_OPTIONS  += $(call ignore_implicit,USE_ACCEPT4)