Skip to content

sendfile(2) implementation for Mac OS 10.3.9-10.4

Notifications You must be signed in to change notification settings

gsteemso/ten4sendfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TEN4SENDFILE

Written by Gordon Steemson, January 2025
⟨[email protected]⟩

On Mac OS 10.3.9 and 10.4.x, Apple included a (wrong) prototype for the
sendfile(2) function in the system headers, but failed to actually implement
it.  This is something of a problem if you’re trying to compile a program that
uses sendfile(2).

This tiny library implements the missing function.  It ought to do exactly
what is described in the Mac OS 10.5 manpage (which is also included in the
repository, and is installed alongside the library and header file if you use
the default makefile).  The manpage is unclear on whether the optional leader
and trailer data should be counted towards the number of bytes written; on the
basis that you want to know how much of the actual file got sent, I opted to
not include them in the count.

Full instructions on how to use this are available by running `make help`.

In the interests of transparency, please note that I have not done much
testing of this library.

About

sendfile(2) implementation for Mac OS 10.3.9-10.4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published