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://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
X-Originating-IP: | [67.71.253.163] |
X-Originating-Email: | [jsgilchrist AT hotmail DOT com] |
X-Sender: | jsgilchrist AT hotmail DOT com |
From: | "Jeff Gilchrist" <jsgilchrist AT hotmail DOT com> |
To: | ford AT vss DOT fsi DOT com |
Cc: | cygwin AT cygwin DOT com |
Subject: | Re: 1.5.5-1: problem with read() on Athlon MP in WinXP |
Date: | Tue, 09 Dec 2003 14:16:34 -0500 |
Mime-Version: | 1.0 |
Message-ID: | <BAY2-F93inmuoQLeGpC0001aaaa@hotmail.com> |
X-OriginalArrivalTime: | 09 Dec 2003 19:16:34.0958 (UTC) FILETIME=[F61002E0:01C3BE88] |
Note-from-DJ: | This may be spam |
>From: Brian Ford <ford AT vss DOT fsi DOT com> >To: Jeff Gilchrist <jsgilchrist AT hotmail DOT com> >CC: cygwin AT cygwin DOT com >Subject: Re: 1.5.5-1: problem with read() on Athlon MP in WinXP >Date: Tue, 9 Dec 2003 12:58:04 -0600 (CST) > >It sounds like you may have two problems here, but this may be the first >one: > >http://cygwin.com/cygwin-ug-net/using-textbinary.html Well don't I feel like a newbie. That was the problem. I was reading in binary data and forgot to add the O_BINARY flag to open(). As soon as I did that, it worked fine on my Athlon system. Not sure why it did work on the other two machines but I guess that was just a fluke. :) I posted the test.c as the minimal amount of code out of a larger program that I had written where I was having the problems. The same code that doesn't work under cygwin on my Athlon was running fine under Linux on the same Althlon and Solaris on a Sparc too so I never suspected something simple as leaving out a O_BINARY. Since my code did work fine under Linux and Solaris, is this an artifact of cygwin having the option to treat files in "DOS" or "Unix" format by default? Or is this an actual bug in how cygwin handles binary data if the "BINARY" flag isn't set? I converted my code to use fopen()/fread() instead and still had the same problem if I didn't speciy the "b" flag. Thanks, this solves my problem and your answer is much appreciated. Jeff. _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca -- 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 |