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.
11 #include "_PDCLIB_glue.h"
13 #include "/usr/include/errno.h"
15 extern _PDCLIB_int64_t lseek64( int fd, _PDCLIB_int64_t offset, int whence );
17 _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
27 /* See comments on implementation-defined errno values in
30 _PDCLIB_errno = _PDCLIB_ERROR;
34 _PDCLIB_int64_t rc = lseek64( stream->handle, offset, whence );
40 stream->pos.offset = rc;
47 /* See comments on implementation-defined errno values in
50 _PDCLIB_errno = _PDCLIB_ERROR;
53 /* This should be something like EUNKNOWN. */
54 _PDCLIB_errno = _PDCLIB_ERROR;
64 #include "_PDCLIB_test.h"
68 /* Testing covered by ftell.c */