3 /* int64_t _PDCLIB_seek( FILE *, int64_t, int )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
11 #ifndef _PDCLIB_GLUE_H
12 #define _PDCLIB_GLUE_H
13 #include <_PDCLIB_glue.h>
16 #include "/usr/include/errno.h"
18 extern int lseek( int fd, int offset, int whence );
20 _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
30 _PDCLIB_errno = _PDCLIB_ERROR;
34 _PDCLIB_int64_t rc = lseek( stream->handle, offset, whence );
40 stream->pos.offset = rc;
45 /* 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;
61 #include <_PDCLIB_test.h>
65 /* Testing covered by ftell.c */