Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a5d7fbfb
Commit
a5d7fbfb
authored
Nov 25, 2002
by
Stefan Leichter
Committed by
Alexandre Julliard
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted implementation of _lseek to _lseeki64, implemented _lseek by
calling _lseeki64.
parent
11f4b444
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
file.c
dlls/msvcrt/file.c
+17
-6
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
No files found.
dlls/msvcrt/file.c
View file @
a5d7fbfb
...
...
@@ -495,9 +495,9 @@ int _fcloseall(void)
/*********************************************************************
* _lseek (MSVCRT.@)
*/
LONG
_lseek
(
int
fd
,
LONG
offset
,
int
whence
)
__int64
_lseeki64
(
int
fd
,
__int64
offset
,
int
whence
)
{
DWORD
ret
;
DWORD
ret
,
hoffset
=
(
DWORD
)
(
offset
>>
32
)
;
HANDLE
hand
=
msvcrt_fdtoh
(
fd
);
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
...
...
@@ -510,17 +510,20 @@ LONG _lseek(int fd, LONG offset, int whence)
return
-
1
;
}
TRACE
(
":fd (%d) to 0x%08lx pos %s
\n
"
,
fd
,
offset
,(
whence
==
SEEK_SET
)
?
"SEEK_SET"
:
TRACE
(
":fd (%d) to 0x%08lx%08lx pos %s
\n
"
,
fd
,
hoffset
,(
long
)
offset
,
(
whence
==
SEEK_SET
)
?
"SEEK_SET"
:
(
whence
==
SEEK_CUR
)
?
"SEEK_CUR"
:
(
whence
==
SEEK_END
)
?
"SEEK_END"
:
"UNKNOWN"
);
if
((
ret
=
SetFilePointer
(
hand
,
offset
,
NULL
,
whence
))
!=
0xffffffff
)
if
(((
ret
=
SetFilePointer
(
hand
,
(
long
)
offset
,
&
hoffset
,
whence
))
!=
INVALID_SET_FILE_POINTER
)
||
!
GetLastError
())
{
if
(
MSVCRT_files
[
fd
])
MSVCRT_files
[
fd
]
->
_flag
&=
~
MSVCRT__IOEOF
;
/* FIXME: What if we seek _to_ EOF - is EOF set? */
return
ret
;
return
((
__int64
)
hoffset
<<
32
)
|
ret
;
}
TRACE
(
":error-last error (%ld)
\n
"
,
GetLastError
());
if
(
MSVCRT_files
[
fd
])
...
...
@@ -538,6 +541,14 @@ LONG _lseek(int fd, LONG offset, int whence)
}
/*********************************************************************
* _lseek (MSVCRT.@)
*/
LONG
_lseek
(
int
fd
,
LONG
offset
,
int
whence
)
{
return
_lseeki64
(
fd
,
offset
,
whence
);
}
/*********************************************************************
* _locking (MSVCRT.@)
*
* This is untested; the underlying LockFile doesn't work yet.
...
...
dlls/msvcrt/msvcrt.spec
View file @
a5d7fbfb
...
...
@@ -327,7 +327,7 @@
@ cdecl _lrotr(long long) _lrotr
@ cdecl _lsearch(ptr ptr long long ptr) _lsearch
@ cdecl _lseek(long long long) _lseek
@
stub _lseeki64 #(long long long)
@
cdecl -ret64 _lseeki64(long long long) _lseeki64
@ forward _ltoa ntdll._ltoa
@ cdecl _ltow(long ptr long) _ltow
@ cdecl _makepath(str str str str str) _makepath
...
...
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