summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/fseek.c')
-rw-r--r--lib/libc/stdio/fseek.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index 1f7ebde..2278f31 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -311,42 +311,3 @@ dumb:
fp->_flags &= ~__SEOF;
return (0);
}
-
-
-fpos_t
-_sseek(fp, offset, whence)
- FILE *fp;
- fpos_t offset;
- int whence;
-{
- fpos_t ret;
- int serrno, errret;
-
- if (fp->_seek == NULL) {
- errno = ESPIPE;
- return (-1);
- }
- serrno = errno;
- errno = 0;
- ret = (*fp->_seek)(fp->_cookie, offset, whence);
- errret = errno;
- if (errno == 0)
- errno = serrno;
- /*
- * Disallow negative seeks per POSIX.
- * It is needed here to help upper level caller
- * in the cases it can't detect.
- */
- if (ret < 0) {
- if (errret == 0) {
- fp->_flags |= __SERR;
- errno = EINVAL;
- }
- fp->_flags &= ~__SOFF;
- ret = -1;
- } else if (fp->_flags & __SOPT) {
- fp->_flags |= __SOFF;
- fp->_offset = ret;
- }
- return (ret);
-}
OpenPOWER on IntegriCloud