1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

29 Commits

Author SHA1 Message Date
Björn Jacke
96340e60b7 s3: add Darwin sendfile support and merge with the FreeBSD code
This is based on the adpotion of the FreeBSD sendfile code that was done by
James Peach for Darwin.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jul 26 17:19:09 CEST 2012 on sn-devel-104
2012-07-26 17:19:09 +02:00
Andrew Bartlett
7a723c6b38 build: Remove support for non-64bit sendfile()
Some early Linux 2.6 platforms can not handle sendfile and _FILE_OFFSET_BITS == 64

This disables sendfile() on these platforms.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun 16 02:21:28 CEST 2012 on sn-devel-104
2012-06-16 02:21:27 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
473b974a06 build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more 2012-04-05 02:39:08 +02:00
Jeremy Allison
e071fd711d Fix read/write calls over sockets to cope with EAGAIN/EWOULDBLOCK for non-blocking sockets. 2010-12-15 01:38:16 +01:00
Jeremy Allison
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
Jeremy Allison
0f450623c5 Fix bug noticed by Volker - if sendfile returns zero then
we might have to handle a short send by filling with zeros.
Jeremy.
2009-01-13 13:02:44 -08:00
Jeremy Allison
83c3b28096 Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy.
2009-01-13 11:19:11 -08:00
Zach Loafman
06d0790c07 Fix various build warnings
This fixes various build warnings on our platform. I'm sure I haven't
caught them all, but it's a start.
(This used to be commit 6b73f259cb)
2008-07-22 15:00:48 +02:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
a1c56e451f r14393: Fix a couple of AIX warnings.
Jeremy.
(This used to be commit 8444c997bd)
2007-10-10 11:15:28 -05:00
Jeremy Allison
be60bf6447 r4296: Patch from William Jojo <jojowil@hvcc.edu> to fix HPUX sendfile and add
configure.in tests and code for sendfile on AIX.
Jeremy.
(This used to be commit f08aceb988)
2007-10-10 10:53:42 -05:00
Jeremy Allison
314ec086f3 r3944: Fix the problem we get on Linux where sendfile fails, but we've already sent the
header using send(). As our implementation of sendfile can't return EINTR (it
restarts in that case) use an errno of EINTR to signal the linux sendfile fail
after header case. When that happens send the rest of the data and then turn
off sendfile. Sendfile should be safe to enable on all systems now (even though
it may not help in all performance cases).
Jeremy.
(This used to be commit 78236382f7)
2007-10-10 10:53:26 -05:00
Tim Potter
0dd2e07ea5 Cast to fix warning on Solaris sendfile - check buildfarm output
to see if this works!  Bug #706.
(This used to be commit 67ab91825d)
2003-11-02 13:59:37 +00:00
Gerald Carter
48f6ede4b4 merging [un]signed declaration
(This used to be commit 15be89e72f)
2003-01-24 16:34:54 +00:00
Jeremy Allison
88e481ec13 Fix Solaris sendfile detection. Add small fixes to sendfile code.
Jeremy.
(This used to be commit 7ba5636897)
2002-10-01 05:54:40 +00:00
Jeremy Allison
4d2d5c4ace Added Solaris sendfile patch + configure tests from Pierre Belanger <belanger@yahoo.com>.
Jeremy.
(This used to be commit 9c17faefa5)
2002-09-30 21:17:18 +00:00
Jeremy Allison
f6bdffbf8d Don't zero out numwritten before using.... Found by Pierre Belanger belanger@pobox.com
Jeremy.
(This used to be commit 495e6e3287)
2002-09-30 05:24:12 +00:00
Jeremy Allison
515c1d42ee Merge back Richard's FreeBSD sendfile fixes.
Jeremy.
(This used to be commit f4845b0213)
2002-09-21 08:53:05 +00:00
Jeremy Allison
994638f577 HPUX sendfile is now detected correctly.
Jeremy.
(This used to be commit 91e41ebe97)
2002-09-18 20:07:56 +00:00
Jeremy Allison
9bab1d0c1a Actually use sendfile if selected.
Jeremy.
(This used to be commit 5881f0a226)
2002-09-17 19:48:19 +00:00
Jeremy Allison
f74086ccf0 Attempt to make broken Linux sendfile work.... Still in progress.
Jeremy.
(This used to be commit f956a4d29d)
2002-09-17 01:00:03 +00:00
Jeremy Allison
3f02393bfd Use HAVE_SENDFILE64, not SENDFILE64.
Jeremy.
(This used to be commit 7e2f9769c9)
2002-09-14 01:38:55 +00:00
Jeremy Allison
febd3f929b Added fix for broken Linux (no sendfile64). When offset + count > 2GB
then return ENOSYS and let the upper layer handle it.
Jeremy
(This used to be commit 872dfd87cd)
2002-09-14 00:34:46 +00:00
Jeremy Allison
6cf499ecff Fixed up FreeBSD sendfile code - only Solaris left then I can add the
configure tests...
Jeremy.
(This used to be commit 9dad88e1d4)
2002-09-12 18:18:35 +00:00
Jeremy Allison
8c5f577c6f HPUX takes offset, not pointer to offset.
Jeremy.
(This used to be commit d7024e8cb9)
2002-09-12 06:26:06 +00:00
Jeremy Allison
fdb8c4dfe1 Fixup sendfile to match HPUX semantics with signal interrups. This was
fiddly.... :-(.
Jeremy.
(This used to be commit 2b33a500a8)
2002-09-12 06:24:41 +00:00
Jeremy Allison
4f613ac61e First cut at portable sendfile code. Only used in readX at the moment
and doesn't actually call sendfile. Needs to be vectored through the
VFS and tested on all supported platforms (Solaris/HPUX/FreeBSD/Linux).
Linux doesn't actually work (2.4.19 kernel) at the moment because it
doesn't have a 64-bit clean sendfile.
Jeremy.
(This used to be commit fd772ca7b1)
2002-09-12 02:12:52 +00:00