summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/ungetc.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-09-01 01:56:54 +0000
committerache <ache@FreeBSD.org>2001-09-01 01:56:54 +0000
commit5610a6ae63a163468769d8b1400a386115b53ddf (patch)
tree7df1c1e8cadd1748528a154d73547f9a81702dae /lib/libc/stdio/ungetc.c
parent8f95e37de3db8c34682949479172b82e88dbacc5 (diff)
downloadFreeBSD-src-5610a6ae63a163468769d8b1400a386115b53ddf.zip
FreeBSD-src-5610a6ae63a163468769d8b1400a386115b53ddf.tar.gz
Back out disabling ungetc() at 0, use different solution:
keep negative offset internally, but return 0 externally in ftell*() I.e. use 0 now as 'unspecified value' per POSIX ungetc() description.
Diffstat (limited to 'lib/libc/stdio/ungetc.c')
-rw-r--r--lib/libc/stdio/ungetc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c
index 092debd..f70fb42 100644
--- a/lib/libc/stdio/ungetc.c
+++ b/lib/libc/stdio/ungetc.c
@@ -132,10 +132,6 @@ __ungetc(int c, FILE *fp)
}
fp->_flags |= __SRD;
}
-
- if (!(fp->_flags & __SSTR) && _ftello(fp) == 0)
- return (EOF);
-
c = (unsigned char)c;
/*
OpenPOWER on IntegriCloud