X-Spam-Check-By: sourceware.org Message-ID: <4420DE20.2050200@byu.net> Date: Tue, 21 Mar 2006 22:18:24 -0700 From: Eric Blake User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cygwin AT cygwin DOT com, pauljlucas AT mac DOT com Subject: Re: Reading too few bytes References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > int fd = ::open( "ESLF", O_RDONLY ); In the absence of O_TEXT or O_BINARY, open() on cygwin chooses the mode of the underlying mount point but mingw always uses O_TEXT. > Here's the contents of a small biinary file "ESLF" (printed in hex bytes): > > 54 39 CA 1A 44 0x1a (ctrl-z) in a text file is Windows EOF. Read binary data in binary mode if you want all the bytes. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEIN4g84KuGfSFAYARAhr6AJ9m1VrQ8p/0yJEnCNyjEapzDEDr3wCgmeXT AuP4dUQ+dJyiL+2dxAAUCCU= =iVtt -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/