Fix source so it is ANSI/POSIX compliant with libraries besides glibc. Add users module for Berkeley DB.