Mail Archives: djgpp/1998/12/08/11:42:47
> Nevertheless is this behaviour correct? Couldn't we expect file mode
> changes on FILE *f to be automatically applied to fileno(f)? Please
> give me a clue.
FILE* streams don't use read() or write(), they use _read() and
_write() directly, and manage the text/binary conversions themselves.
Why? So they can do fseek() and ftell() properly.
However, if you open a file with "rb" it does open the underlying
descriptor with O_BINARY, so it should work as you expect. Are you
using 2.01 or 2.02?
- Raw text -