From: earnie_boyd AT yahoo DOT com (Earnie Boyd) Subject: BUG: cygwin32 function _read 18 Jun 1998 17:36:12 -0700 Message-ID: <19980618155247.22415.rocketmail.cygnus.gnu-win32@send1a.yahoomail.com> Reply-To: earnie_boyd AT yahoo DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: gw32 This is a followup to my previous post on "fread, fseek and ftell vs. _read and _lseek": My original test was using the Mingw32 compiler. I decided to try it with the cygwin32 libraries and find that the _read function misbehaves. In my test after the ^Z EOF I perform a second read which should return zero bytes read (which it does) and no data read (which it gives me data). With each read I'm requesting 22 bytes. The first read gives me 20 bytes read because ^Z is in byte 21. The secound read reports 0 bytes read but actually read the 22 and move the file pointer. I find that fread is working better than the M$ version. It does destroy the file pointer; it doesn't put erronious data in the buffer and you can fseek past the ^Z. This is what the _read was supposed to have done. == - \\||// ---o0O0--Earnie--0O0o---- --earnie_boyd AT yahoo DOT com-- ------ooo0O--O0ooo------- _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".