* Ralf Wildenhues wrote on Sat, May 27, 2006 at 12:22:35PM CEST: > * Simon Josefsson wrote on Sat, May 27, 2006 at 12:12:59PM CEST: > > + int save_errno = errno; > > You are using errno but not including <errno.h>.
...and realloc but not including <stdlib.h>. Please compile your code with lots of warnings enabled. You pass NULL to realloc and possibly to free but are not depending on the realloc and free modules. I wonder whether you want to read it in text or in binary mode (for Cygwin...). Cheers, Ralf