This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.5.5-1: problem with read() on Athlon MP in WinXP
- From: "Jeff Gilchrist" <jsgilchrist at hotmail dot com>
- To: ford at vss dot fsi dot com
- Cc: cygwin at cygwin dot com
- Date: Tue, 09 Dec 2003 14:16:34 -0500
- Subject: Re: 1.5.5-1: problem with read() on Athlon MP in WinXP
From: Brian Ford <firstname.lastname@example.org>
To: Jeff Gilchrist <email@example.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
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.
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html