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 Message-ID: <42BC4F4A.9091735C@dessent.net> Date: Fri, 24 Jun 2005 11:22:02 -0700 From: Brian Dessent MIME-Version: 1.0 To: "'Cygwin List'" Subject: Re: stat file -- cygwin vs. Windows size? References: <20206A8F2DE2 AT mail DOT learnquick DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Report: -5.9/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.0 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Herb Martin wrote: > Is there a standard Cygwin 'idiom' or function for > dealing with this mismatch, or should I just re-invent > the wheel. Sure. Don't use text mode. Open the file in binary mode (O_BINARY with open(), "b" with fopen()), or call setmode(fd, O_BINARY) once open, or link against binmode.o. Or just don't use text mode mounts. 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/