mcdb_make.c - posix_fallocate() returns an error code but does not set errno, so catch the return code.  Note: mcdb will fail to create an empty mcdb, failing with Invalid Argument (from passing zero length to posix_fallocate()).  It is likely to be mistake (blank line in input) that might create an empty mcdb, so it is an error.  If we wish to allow it, then modify mcdb_mmap_commit() to simply check for no length beyond the mcdb header, and then skip calls to posix_fallocate() and msync().
mcdb_make.c - posix_fallocate() returns an error code but does not set
errno, so catch the return code.  Note: mcdb will fail to create an
empty mcdb, failing with Invalid Argument (from passing zero length to
posix_fallocate()).  It is likely to be mistake (blank line in input)
that might create an empty mcdb, so it is an error.  If we wish to allow
it, then modify mcdb_mmap_commit() to simply check for no length beyond
the mcdb header, and then skip calls to posix_fallocate() and msync().


gstrauss/mcdb,gstrauss/mcdb,gstrauss/mcdb,gstrauss/mcdb,gstrauss/mcdb