This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: file descriptors opened as text files
> Yes, b is fine when opening a file *handle* with fopen(). But I am working
> with a file *descriptor* returned by open(), which is quite different.
> open()'s behavior is ruled by a bunch of O flags such as O_RDONLY,
The best way to make this portable is to do this:
#include <fcntl.h>
#ifndef O_BINARY
#define O_BINARY 0
#endif
Now you can use O_BINARY everywhere, and it will always do the right
thing. Same for O_TEXT if you need it.
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple