- switch ( whence )
- {
- case SEEK_SET:
- case SEEK_CUR:
- case SEEK_END:
- /* EMPTY - OK */
- break;
- default:
- /* See comments on implementation-defined errno values in
- <_PDCLIB_config.h>.
- */
- _PDCLIB_errno = _PDCLIB_ERROR;
- return EOF;
- break;
- }
- _PDCLIB_int64_t rc = lseek64( stream->handle, offset, whence );
- if ( rc != EOF )
- {
- stream->ungetidx = 0;
- stream->bufidx = 0;
- stream->bufend = 0;
- stream->pos.offset = rc;
- return rc;
- }
- switch ( errno )
- {
- case EBADF:
- case EFAULT:
- /* See comments on implementation-defined errno values in
- <_PDCLIB_config.h>.
- */
- _PDCLIB_errno = _PDCLIB_ERROR;
- break;
- default:
- /* This should be something like EUNKNOWN. */
- _PDCLIB_errno = _PDCLIB_ERROR;
- break;
- }