C99 library issues

Geoff Keating geoffk@geoffk.org
Mon Nov 12 13:14:00 GMT 2001


> Date: Mon, 19 Nov 2001 14:34:48 +0100
> From: Jakub Jelinek <jakub@redhat.com>
> Cc: libc-alpha@sources.redhat.com, gcc@gcc.gnu.org

> As for
> - deprecate ungetc at the beginning of a binary file
> I don't see what should be done to say this is done.

There is a documentation issue; how about this?

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>

===File /home/geoffk/patches/cygnus/glibc-c99ungetcbin.patch===
2001-11-19  Geoff Keating  <geoffk@redhat.com>

	* manual/stdio.texi (How Unread): Document that ungetc on
	a binary-mode file is unportable.

Index: libc/manual/stdio.texi
===================================================================
RCS file: /cvs/glibc/libc/manual/stdio.texi,v
retrieving revision 1.130
diff -p -u -u -p -r1.130 stdio.texi
--- stdio.texi	2001/10/29 15:56:29	1.130
+++ stdio.texi	2001/11/19 20:01:41
@@ -1383,9 +1383,10 @@ If @var{c} is @code{EOF}, @code{ungetc} 
 The character that you push back doesn't have to be the same as the last
 character that was actually read from the stream.  In fact, it isn't
 necessary to actually read any characters from the stream before
-unreading them with @code{ungetc}!  But that is a strange way to write
-a program; usually @code{ungetc} is used only to unread a character
-that was just read from the same stream.
+unreading them with @code{ungetc}!  But that is a strange way to write a
+program; usually @code{ungetc} is used only to unread a character that
+was just read from the same stream.  The GNU C library supports this
+even on files opened in binary mode, but other systems might not.
 
 The GNU C library only supports one character of pushback---in other
 words, it does not work to call @code{ungetc} twice without doing input
============================================================



More information about the Libc-alpha mailing list