public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4359] New: the __freadable function is not compatible with Solaris
@ 2007-04-13 22:04 bruno at clisp dot org
  2007-04-13 22:05 ` [Bug libc/4359] " bruno at clisp dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2007-04-13 22:04 UTC (permalink / raw)
  To: glibc-bugs

The comments in <stdio_ext.h> indicate that the functions declared in this
file are intended to be Solaris compatible. However, __freadable is not.

Attached program prints on Solaris:

Initial state for write-only stream: 0 1
Initial state for read-only stream:  1 0
Initial state for read-write stream: 0 0
Initial state for read-write stream: 0 0

And on a glibc system:

Initial state for write-only stream: 1 1
Initial state for read-only stream:  1 0
Initial state for read-write stream: 1 0
Initial state for read-write stream: 1 0

-- 
           Summary: the __freadable function is not compatible with Solaris
           Product: glibc
           Version: 2.3.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: bruno at clisp dot org
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i586-suse-linux
  GCC host triplet: i586-suse-linux
GCC target triplet: i586-suse-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=4359

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/4359] the __freadable function is not compatible with Solaris
  2007-04-13 22:04 [Bug libc/4359] New: the __freadable function is not compatible with Solaris bruno at clisp dot org
@ 2007-04-13 22:05 ` bruno at clisp dot org
  2007-04-13 22:07 ` [Bug libc/4359] the __freading " bruno at clisp dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2007-04-13 22:05 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2007-04-13 23:05 -------
Created an attachment (id=1679)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1679&action=view)
source code of test program


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4359

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/4359] the __freading function is not compatible with Solaris
  2007-04-13 22:04 [Bug libc/4359] New: the __freadable function is not compatible with Solaris bruno at clisp dot org
  2007-04-13 22:05 ` [Bug libc/4359] " bruno at clisp dot org
@ 2007-04-13 22:07 ` bruno at clisp dot org
  2007-10-13  7:21 ` drepper at redhat dot com
  2007-10-13 11:13 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2007-04-13 22:07 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2007-04-13 23:07 -------
Oops, I meant __freading, not __freadable.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|the __freadable function is |the __freading function is
                   |not compatible with Solaris |not compatible with Solaris


http://sourceware.org/bugzilla/show_bug.cgi?id=4359

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/4359] the __freading function is not compatible with Solaris
  2007-04-13 22:04 [Bug libc/4359] New: the __freadable function is not compatible with Solaris bruno at clisp dot org
  2007-04-13 22:05 ` [Bug libc/4359] " bruno at clisp dot org
  2007-04-13 22:07 ` [Bug libc/4359] the __freading " bruno at clisp dot org
@ 2007-10-13  7:21 ` drepper at redhat dot com
  2007-10-13 11:13 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2007-10-13  7:21 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2007-10-13 07:21 -------
While I don't quite see why it's needed (libio simply puts new streams in
read-mode) I added appropriate changes.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=4359

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libc/4359] the __freading function is not compatible with Solaris
  2007-04-13 22:04 [Bug libc/4359] New: the __freadable function is not compatible with Solaris bruno at clisp dot org
                   ` (2 preceding siblings ...)
  2007-10-13  7:21 ` drepper at redhat dot com
@ 2007-10-13 11:13 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2007-10-13 11:13 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2007-10-13 11:12 -------
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);


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4359

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-10-13 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-13 22:04 [Bug libc/4359] New: the __freadable function is not compatible with Solaris bruno at clisp dot org
2007-04-13 22:05 ` [Bug libc/4359] " bruno at clisp dot org
2007-04-13 22:07 ` [Bug libc/4359] the __freading " bruno at clisp dot org
2007-10-13  7:21 ` drepper at redhat dot com
2007-10-13 11:13 ` bruno at clisp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).