Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Thu, 15 Feb 2001 10:59:10 -0500 Message-Id: <200102151559.KAA31161@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f From: DJ Delorie To: delvare AT ensicaen DOT ismra DOT fr CC: lhall AT rfk DOT com, cygwin AT sources DOT redhat DOT com In-reply-to: (message from Jean Delvare on Thu, 15 Feb 2001 15:36:59 +0100 (MET)) Subject: Re: file descriptors opened as text files References: > 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 #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