Compile correctly on OSX
Report an error when db_auth_user fails.
Handle errors if wgetch returns ERR

This should prevent going into an infinite loop trying to read from the
user if they go away.
Return 0 in all cases in do_oname.

Fixes build errors.
Gitignore generated files.
Fix warnings produced by clang.
Merge branch 'upstream'