Rivoreo Source Code Repositories
src.rivoreo.one
/
toolbox
/
9c4133d03f3aa0acbc720af6ba53e5ec70409f29
/
.
/
posix-io-for-windows
/
lseek.c
blob: 989741cd06f95ce8ed08d284d92d39a0a0e9764e [
file
] [
log
] [
blame
] [
raw
]
#include
<windows.h>
#include
<unistd.h>
#include
<errno.h>
off_t
lseek
(
int
fd
,
off_t
offset
,
int
whence
)
{
if
(
whence
<
0
||
whence
>
2
)
{
errno
=
EINVAL
;
return
-
1
;
}
return
SetFilePointer
((
void
*)
fd
,
offset
,
NULL
,
whence
);
}