delorie.com/archives/browse.cgi | search |
> 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |