> Adding the <unistd.h> fixes the problem in all its iterations I must be missing a point here, so what was the problem with the original test program (which BTW worked fine on my CYGWIN installation). Seems like <unistd.h> was not needed there? And how adding just <unistd.h> (w/o adding ftruncate(), IIUC) has made it work?
Thanks, Anton Lavrentiev Contractor NIH/NLM/NCBI