getcwd does not handle EFAULT on FreeBSD
Get the appropriate priority for the scheduler which will be set

Also, remove/fix some static function prototypes

Sponsored-by: EMC Isilon
Add some diagnostics to t_dir
Add more diagnostic info here
Add more diagnostic output and make sure the value being tested is i, not val
Handle value -> NULL gracefully like NetBSD does

Sponsored-by: EMC Isilon
FreeBSD doesn't understand the f mode flag like NetBSD does
Add some diagnostic output
Make the -w / test work when the user is root
Disable f_memopen for now
faccessat in FreeBSD does not support AT_SYMLINK_NOFOLLOW like Linux/NetBSD
Handle invalid modes properly

Sponsored-by: EMC Isilon
Simplify the idioms in use

Sponsored-by: EMC Isilon