Mail Archives: cygwin/2004/12/09/19:49:33
On Fri, 10 Dec 2004, Peter Astrand wrote:
> >> I've discovered that fread(ptr, size, nitems, stream) sometimes returns a
> >> value less than "nitems", but does not set feof() nor ferror(). As I
>
> >A simple, compilable test case with results shown on both linux and
> >cygwin would prove your theory.
>
> Here you go; example follows. Test run on Linux:
>
> ---
> Got 66 bytes:
> /bin/ls: /somebogus: Filen eller katalogen finns inte
> /etc/passwd
> |EOF has been reached.
> ---
>
> Test run on Cygwin:
>
> ---
> $ ./a.exe
> Got 9 bytes:
> /bin/ls: |
> ---
>
> As you can see, the result is partial, and there is no EOF nor error.
>
> I guess this is the problem described at
> http://sources.redhat.com/ml/newlib/2004/msg00477.html. Perhaps you can
> apply the suggested patch?
According to <http://sources.redhat.com/ml/newlib/2004/msg00478.html>, the
patch was checked in on Oct 26. Cygwin uses the latest version of newlib.
Cygwin 1.5.12-1 was released on Nov 10, so it should contain this patch.
You can verify this by downloading the Cygwin source package, and looking
at newlib/libc/stdio/fread.c.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
--
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/
- Raw text -