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 );
16 extern long lseek( int fd, long offset, int whence );
18 _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
28 /* See comments on implementation-defined errno values in
31 _PDCLIB_errno = _PDCLIB_ERROR;
36 _PDCLIB_int64_t rc = lseek( stream->handle, offset, whence );
38 _PDCLIB_int64_t rc = lseek64( stream->handle, offset, whence );
45 stream->pos.offset = rc;
52 /* See comments on implementation-defined errno values in
55 _PDCLIB_errno = _PDCLIB_ERROR;
58 /* This should be something like EUNKNOWN. */
59 _PDCLIB_errno = _PDCLIB_ERROR;
69 #include "_PDCLIB_test.h"
73 /* Testing covered by ftell.c */