summaryrefslogtreecommitdiff
path: root/trunk/ACE/ace/OS_NS_sys_sendfile.inl
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/ACE/ace/OS_NS_sys_sendfile.inl')
-rw-r--r--trunk/ACE/ace/OS_NS_sys_sendfile.inl24
1 files changed, 24 insertions, 0 deletions
diff --git a/trunk/ACE/ace/OS_NS_sys_sendfile.inl b/trunk/ACE/ace/OS_NS_sys_sendfile.inl
new file mode 100644
index 00000000000..1c468354b3e
--- /dev/null
+++ b/trunk/ACE/ace/OS_NS_sys_sendfile.inl
@@ -0,0 +1,24 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#ifdef ACE_HAS_SENDFILE
+# include <sys/sendfile.h>
+#endif /* ACE_HAS_SENDFILE */
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_INLINE ssize_t
+ACE_OS::sendfile (ACE_HANDLE out_fd,
+ ACE_HANDLE in_fd,
+ off_t * offset,
+ size_t count)
+{
+#ifdef ACE_HAS_SENDFILE
+ return ::sendfile (out_fd, in_fd, offset, count);
+#else
+ return ACE_OS::sendfile_emulation (out_fd, in_fd, offset, count);
+#endif /* ACE_HAS_SENDFILE */
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL