Project

General

Profile

Feature #2687

[PATCH] Support sendfile on darwin

Added by mackyle almost 4 years ago. Updated almost 4 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
2015-12-03
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:
Yes

Description

The FreeBSD version of sendfile is already supported. Starting
with OS X 10.5, Darwin also supports sendfile, but using a
slightly different argument list.

Add support for darwin's sendfile by introducing a suitable
macro to adjust the arguments.

Patch file attached.

See also http://repo.or.cz/lighttpd/svnmirror/patches.git/commitdiff/45341ce9

Associated revisions

Revision 3060 (diff)
Added by stbuehler almost 4 years ago

[network] add darwin-sendfile backend (fixes #2687)

The FreeBSD version of sendfile is already supported. Starting
with OS X 10.5, Darwin also supports sendfile, but using a
slightly different argument list even though much of the
implementation is likely taken from FreeBSD just like the man
page is.

Add support for darwin's sendfile by introducing a new
network_darwin_sendfile.c file that's just a copy of the
network_freebsd_sendfile.c file except with the arguments
adjusted to compensate for the minor API difference (FreeBSD
has separate in and out byte count arguments whereas Darwin
has a combined in/out byte count argument).

Signed-off-by: Kyle J. McKay <>

Revision 159ca0c1 (diff)
Added by mackyle almost 4 years ago

[network] add darwin-sendfile backend (fixes #2687)

The FreeBSD version of sendfile is already supported. Starting
with OS X 10.5, Darwin also supports sendfile, but using a
slightly different argument list even though much of the
implementation is likely taken from FreeBSD just like the man
page is.

Add support for darwin's sendfile by introducing a new
network_darwin_sendfile.c file that's just a copy of the
network_freebsd_sendfile.c file except with the arguments
adjusted to compensate for the minor API difference (FreeBSD
has separate in and out byte count arguments whereas Darwin
has a combined in/out byte count argument).

Signed-off-by: Kyle J. McKay <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3060 152afb58-edef-0310-8abb-c4023f1b3aa9

History

#1

Updated by stbuehler almost 4 years ago

  • Target version changed from 1.4.x to 1.4.39

Given that it is obviously not the "freebsd-sendfile" I'd prefer having it in a separate file with a separate name like all the others. (Also I don't see any need to patch the sendfile definition with a macro in the header)

#2

Updated by mackyle almost 4 years ago

Seems a shame to duplicate all that just for one argument difference, but it's trivial enough to do so here it is.

The new network_darwin_sendfile.c is almost an exact duplicate of network_freebsd_sendfile.c.

See also http://repo.or.cz/lighttpd/svnmirror/patches.git/commitdiff/ae23ffcf

#3

Updated by stbuehler almost 4 years ago

  • Assignee deleted (stbuehler)
  • Target version changed from 1.4.39 to 1.4.38
#4

Updated by stbuehler almost 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r3060.

Also available in: Atom