delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <422A2BEA.1022B239@dessent.net> |
Date: | Sat, 05 Mar 2005 14:00:10 -0800 |
From: | Brian Dessent <brian AT dessent DOT net> |
Organization: | My own little world... |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: apparent bug: incorrect file position after write() |
References: | <20050305212628 DOT 80C37164005 AT ws1-4 DOT us4 DOT outblaze DOT com> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
"imaginate australiamail.com" wrote: > > > > > Brian Dessent wrote: > > > > > If > you don't want that, then don't use textmode mounts. > > > > ...or open the file with O_BINARY. > > > > Mounting binary solves the problem - I wasn't aware of that functionality. O_BINARY is probably not so portable so I'll steer clear of that. You can get around that using #ifdef and #define etc. Or you can link against the Cygwin-provided binmode.o to make all opens binary by default. If you ever plan to distribute your program, you'll pull your hair out with Cygwin users and textmode mounts, so probably better to open in binary mode if you're doing binary I/O. Brian -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |