> 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
- Re: file descriptors opened as text files Jean Delvare
- Re: file descriptors opened as text fi... Larry Hall (RFK Partners Inc)
- Re: file descriptors opened as text fi... Ross Smith
- Re: file descriptors opened as text fi... Christopher Faylor
- Re: file descriptors opened as text fi... Jesper Eskilson
- Re: file descriptors opened as text fi... Jean Delvare
- Re: file descriptors opened as text fi... Larry Hall (RFK Partners, Inc)
- Re: file descriptors opened as text fi... Jean Delvare
- Re: file descriptors opened as text fi... Larry Hall (RFK Partners, Inc)
- Re: file descriptors opened as text fi... Christopher Faylor
- Re: file descriptors opened as text fi... DJ Delorie
- Re: file descriptors opened as text fi... Jean Delvare
- Re: file descriptors opened as text fi... Larry Hall (RFK Partners, Inc)
- Re: file descriptors opened as text fi... Jean Delvare
- Re: file descriptors opened as text fi... Larry Hall (RFK Partners, Inc)
- Re: file descriptors opened as text fi... Christopher Faylor
- Re: file descriptors opened as text fi... Earnie Boyd
- Re: file descriptors opened as text fi... Corinna Vinschen
- Re: file descriptors opened as text fi... Earnie Boyd
- Re: file descriptors opened as text fi... Jean Delvare
- RE: file descriptors opened as text fi... Lothan