1 /* int64_t _PDCLIB_seek( FILE *, int64_t, int )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
9 #include <_PDCLIB_glue.h>
11 #include "/usr/include/errno.h"
13 extern _PDCLIB_int64_t lseek64( int fd, _PDCLIB_int64_t offset, int whence );
15 _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
25 /* See comments on implementation-defined errno values in
28 _PDCLIB_errno = _PDCLIB_ERROR;
32 _PDCLIB_int64_t rc = lseek64( stream->handle, offset, whence );
38 stream->pos.offset = rc;
45 /* See comments on implementation-defined errno values in
48 _PDCLIB_errno = _PDCLIB_ERROR;
51 /* This should be something like EUNKNOWN. */
52 _PDCLIB_errno = _PDCLIB_ERROR;
59 #include <_PDCLIB_test.h>
63 /* Testing covered by ftell.c */