please fix me up?
There is no pthread_spin_lock on OSX. We could consider using mutexes
instead, but this is a drop-in replacement.

See https://idea.popcount.org/2012-09-12-reinventing-spinlocks/
Similarly, there is no timed lock. Here is an example that references an
implementation from Mono:
http://aleksmaus.blogspot.nl/2011/12/missing-pthreadmutextimedlock-on.html
Built-in functions require us to be permissive.
We need to explicitly request mangling for OSX to pickup these
functions.
proper st_atim fallback
pthread_getattr_np doesn't exist, normal init for now
fix livelistptr typedef
_SC_PHYS_PAGES not present, so use sysctl
use gettimeofday on osx
implement posix_fallocate alternative
mountain lion compatible functions
this macro is already defind by sys/fcntl.h
L_cuserid doesn't exist everywhere.
ugh, compiler can't deduce proper type itself
some header defines deprecated which is used in enum
don't include debug stuff for now.
even though we're building in gcc, we don't have this
use more portable sig_t
portable regrip