This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 1.5.5.1 fgetc returns no error for bad file descriptor
On Mon, Mar 08, 2004 at 08:11:37PM +0000, Ghanshyam wrote:
>The 9th assertion of fgetc in "IEEE std 2003.1-1992 Test Methods for
>Measuring Conformance to Posix-Part1 System Interface" document states:
>When the stream pointer argument addresses a file descriptor that is
>not open for reading, then a call to fgetc()returns a value of EOF and
>sets errno to [EBADF]. The current implementation does not set any
>errno. It says "No error".
Since this is a simple thing to demonstrate, rather than have someone go
to the effort of writing a test program to see if your assertion is
correct, why not submit a test program which demonstrates the problem
that you are allegedly seeing?
You could even take the extra step of submitting a patch to fix this
behavior. The code in question is in newlib.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com
--
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/