Bring in NetBSD's improvements and cleanups to NLS subsystem, making it type and endian clean and removing of stdio dependency from NLS functions (catalog files now are processed via mmap()).
Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap()).

Also following changes were done (against NetBSD version):

. ANSI'fy prototypes
. Mention FreeBSD in comments
. Pull in sys/types.h instead of sys/_types.h since some types used here
  are defined in sys/types.h

Obtained from:	NetBSD (mostly)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase