Summary: | the __freading function is not compatible with Solaris | ||
---|---|---|---|
Product: | glibc | Reporter: | Bruno Haible <bruno> |
Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | glibc-bugs |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | 2.3.6 | ||
Target Milestone: | --- | ||
Host: | i586-suse-linux | Target: | i586-suse-linux |
Build: | i586-suse-linux | Last reconfirmed: | |
Attachments: | source code of test program |
Description
Bruno Haible
2007-04-13 23:04:21 UTC
Created attachment 1679 [details]
source code of test program
Oops, I meant __freading, not __freadable. While I don't quite see why it's needed (libio simply puts new streams in read-mode) I added appropriate changes. Thank you. This change allows to describe what __freading returns in a quite precise way, as follows. Also, it makes __freading symmetric to __fwriting. /* Return true if the stream STREAM is opened read-only, or if the last operation on the stream was a read operation. Return false if the stream is opened write-only or append-only, or if it supports writing and there is no current read operation (such as fputc). freading and fwriting will never both be true. If STREAM supports both reads and writes, then: - both freading and fwriting might be false when the stream is first opened, after read encounters EOF, or after fflush, - freading might be false or true and fwriting might be false after repositioning (such as fseek, fsetpos, or rewind), depending on the underlying implementation. */ extern int __freading (FILE *stream); |