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 int lseek( int fd, int offset, int whence );
15 _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
25 _PDCLIB_errno = _PDCLIB_ERROR;
29 _PDCLIB_int64_t rc = lseek( stream->handle, offset, whence );
35 stream->pos.offset = rc;
40 /* See comments on implementation-defined errno values in
45 _PDCLIB_errno = _PDCLIB_ERROR;
48 /* This should be something like EUNKNOWN. */
49 _PDCLIB_errno = _PDCLIB_ERROR;
56 #include <_PDCLIB_test.h>
60 /* Testing covered by ftell.c */