Subject: Re: 1.5.5-1: problem with read() on Athlon MP in WinXP
From: "Jeff Gilchrist" <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 09 Dec 2003 14:16:34 -0500

>From: Brian Ford <[email-masked]>
>To: Jeff Gilchrist <[email-masked]>
>CC: [email-masked]
>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/