libOSXCompat is quite simply the headers and functions of common BSDish subroutines ported to be used as functional shims for MacOS X. Why does this exist? To enable one to port code from other platforms with (hopefully) minimal effort. In essence, this is a collection of shims that I’ve become rather reliant upon to get code that was written for another system to work under OSX – I hope they’ll make your life easier as well.
What’s supported? I’m glad you asked! Here’s what I’ve currently got covered: assert(3), basename(3), cfree(3), cftime(3), cuserid(3), dirname(3), ftime(3), getpw(3), gtty(3), inet_addr(3), inet_aton(3), inet_ntoa(3), insque(3), lfind(3), lsearch(3), poll(2), psignal(3), re_comp(3), re_exec(3), regerror(3), remque(3), rexec(3), strcasestr(3), strsignal(3), stty(3), as well as a few others which are not quite as widely used.
Note that these generally follow FreeBSD 4.x’s semantics, being widely based upon that code, when not outright pilfered. The majority of these subroutines are under the BSD license, with the exception of the poll() emulation, and strsignal(), which are both in the public domain. The routine’s sources are included, as well as the headers (where applicable), as well as the BSD manpages. Caveats are mentioned within the README (Primarily affecting poll(2)). If you missed the first link, it’s here. You might also want to look here for dlopen(3) compatibility.
‘Nuff said. Get to porting your favorite oldschool code. ;)