Hi all. > There is some stuff at the bottom of MinGW's fcntl.h (_fmode, > _setmode()) that looks as if it might be relevant. These are indeed the animals you need. For example: #ifdef _WIN32 _fmode = _O_BINARY; #endif Cheers Mike Thomas