zero mapping handle too
add windows specific ftruncate implementation
command unused glob functions. we never used them
do not set database flag if its not mapped