carta
getmode(3) on FreeBSD
The text c2f10006ba6a, as FreeBSD 9.3-RELEASE shipped it.
modify mode bits
getmode(3) on FreeBSD now