Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
44b49f1a
Commit
44b49f1a
authored
Oct 29, 2019
by
Daniel Lehman
Committed by
Alexandre Julliard
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Set errno in _lseeki64.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54f4bfb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
file.c
dlls/msvcrt/file.c
+1
-0
file.c
dlls/msvcrt/tests/file.c
+26
-0
No files found.
dlls/msvcrt/file.c
View file @
44b49f1a
...
...
@@ -1265,6 +1265,7 @@ __int64 CDECL MSVCRT__lseeki64(int fd, __int64 offset, int whence)
if
(
info
->
handle
==
INVALID_HANDLE_VALUE
)
{
*
MSVCRT__errno
()
=
MSVCRT_EBADF
;
release_ioinfo
(
info
);
return
-
1
;
}
...
...
dlls/msvcrt/tests/file.c
View file @
44b49f1a
...
...
@@ -2583,6 +2583,31 @@ static void test__creat(void)
p__set_fmode
(
old_fmode
);
}
static
void
test_lseek
(
void
)
{
int
fd
;
char
testdata
[
4
]
=
{
'a'
,
'\n'
,
'b'
,
'\n'
};
errno
=
0xdeadbeef
;
ok
(
_lseek
(
-
42
,
0
,
SEEK_SET
)
==
-
1
,
"expected failure
\n
"
);
ok
(
errno
==
EBADF
,
"errno = %d
\n
"
,
errno
);
fd
=
_creat
(
"_creat.tst"
,
_S_IWRITE
);
ok
(
fd
>
0
,
"_creat failed
\n
"
);
_write
(
fd
,
testdata
,
4
);
errno
=
0xdeadbeef
;
ok
(
_lseek
(
fd
,
0
,
42
)
==
-
1
,
"expected failure
\n
"
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
errno
=
0xdeadbeef
;
ok
(
_lseek
(
fd
,
-
42
,
SEEK_SET
)
==
-
1
,
"expected failure
\n
"
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
_close
(
fd
);
DeleteFileA
(
"_creat.tst"
);
}
START_TEST
(
file
)
{
int
arg_c
;
...
...
@@ -2654,6 +2679,7 @@ START_TEST(file)
test_write_flush
();
test_close
();
test__creat
();
test_lseek
();
/* Wait for the (_P_NOWAIT) spawned processes to finish to make sure the report
* file contains lines in the correct order
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment