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
b43fd312
Commit
b43fd312
authored
Apr 29, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Rename a few functions to avoid conflicts with Windows headers.
parent
0d195997
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
file.c
dlls/msvcrt/file.c
+21
-21
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+5
-5
No files found.
dlls/msvcrt/file.c
View file @
b43fd312
...
...
@@ -803,7 +803,7 @@ void msvcrt_free_io(void)
/*********************************************************************
* _lseeki64 (MSVCRT.@)
*/
__int64
CDECL
_lseeki64
(
int
fd
,
__int64
offset
,
int
whence
)
__int64
CDECL
MSVCRT_
_lseeki64
(
int
fd
,
__int64
offset
,
int
whence
)
{
HANDLE
hand
=
msvcrt_fdtoh
(
fd
);
LARGE_INTEGER
ofs
,
ret
;
...
...
@@ -840,9 +840,9 @@ __int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
/*********************************************************************
* _lseek (MSVCRT.@)
*/
LONG
CDECL
_lseek
(
int
fd
,
LONG
offset
,
int
whence
)
LONG
CDECL
MSVCRT_
_lseek
(
int
fd
,
LONG
offset
,
int
whence
)
{
return
_lseeki64
(
fd
,
offset
,
whence
);
return
MSVCRT_
_lseeki64
(
fd
,
offset
,
whence
);
}
/*********************************************************************
...
...
@@ -850,7 +850,7 @@ LONG CDECL _lseek(int fd, LONG offset, int whence)
*
* This is untested; the underlying LockFile doesn't work yet.
*/
int
CDECL
_locking
(
int
fd
,
int
mode
,
LONG
nbytes
)
int
CDECL
MSVCRT_
_locking
(
int
fd
,
int
mode
,
LONG
nbytes
)
{
BOOL
ret
;
DWORD
cur_locn
;
...
...
@@ -920,7 +920,7 @@ int CDECL MSVCRT_fseek(MSVCRT_FILE* file, long offset, int whence)
}
/* Clear end of file flag */
file
->
_flag
&=
~
MSVCRT__IOEOF
;
return
(
_lseek
(
file
->
_file
,
offset
,
whence
)
==
-
1
)
?-
1
:
0
;
return
(
MSVCRT_
_lseek
(
file
->
_file
,
offset
,
whence
)
==
-
1
)
?-
1
:
0
;
}
/*********************************************************************
...
...
@@ -940,10 +940,10 @@ int CDECL _chsize(int fd, long size)
if
(
handle
!=
INVALID_HANDLE_VALUE
)
{
/* save the current file pointer */
cur
=
_lseek
(
fd
,
0
,
SEEK_CUR
);
cur
=
MSVCRT_
_lseek
(
fd
,
0
,
SEEK_CUR
);
if
(
cur
>=
0
)
{
pos
=
_lseek
(
fd
,
size
,
SEEK_SET
);
pos
=
MSVCRT_
_lseek
(
fd
,
size
,
SEEK_SET
);
if
(
pos
>=
0
)
{
ret
=
SetEndOfFile
(
handle
);
...
...
@@ -951,7 +951,7 @@ int CDECL _chsize(int fd, long size)
}
/* restore the file pointer */
_lseek
(
fd
,
cur
,
SEEK_SET
);
MSVCRT_
_lseek
(
fd
,
cur
,
SEEK_SET
);
}
}
...
...
@@ -1079,16 +1079,16 @@ MSVCRT_FILE* CDECL MSVCRT__wfdopen(int fd, const MSVCRT_wchar_t *mode)
/*********************************************************************
* _filelength (MSVCRT.@)
*/
LONG
CDECL
_filelength
(
int
fd
)
LONG
CDECL
MSVCRT_
_filelength
(
int
fd
)
{
LONG
curPos
=
_lseek
(
fd
,
0
,
SEEK_CUR
);
LONG
curPos
=
MSVCRT_
_lseek
(
fd
,
0
,
SEEK_CUR
);
if
(
curPos
!=
-
1
)
{
LONG
endPos
=
_lseek
(
fd
,
0
,
SEEK_END
);
LONG
endPos
=
MSVCRT_
_lseek
(
fd
,
0
,
SEEK_END
);
if
(
endPos
!=
-
1
)
{
if
(
endPos
!=
curPos
)
_lseek
(
fd
,
curPos
,
SEEK_SET
);
MSVCRT_
_lseek
(
fd
,
curPos
,
SEEK_SET
);
return
endPos
;
}
}
...
...
@@ -1098,16 +1098,16 @@ LONG CDECL _filelength(int fd)
/*********************************************************************
* _filelengthi64 (MSVCRT.@)
*/
__int64
CDECL
_filelengthi64
(
int
fd
)
__int64
CDECL
MSVCRT_
_filelengthi64
(
int
fd
)
{
__int64
curPos
=
_lseeki64
(
fd
,
0
,
SEEK_CUR
);
__int64
curPos
=
MSVCRT_
_lseeki64
(
fd
,
0
,
SEEK_CUR
);
if
(
curPos
!=
-
1
)
{
__int64
endPos
=
_lseeki64
(
fd
,
0
,
SEEK_END
);
__int64
endPos
=
MSVCRT_
_lseeki64
(
fd
,
0
,
SEEK_END
);
if
(
endPos
!=
-
1
)
{
if
(
endPos
!=
curPos
)
_lseeki64
(
fd
,
curPos
,
SEEK_SET
);
MSVCRT_
_lseeki64
(
fd
,
curPos
,
SEEK_SET
);
return
endPos
;
}
}
...
...
@@ -1941,7 +1941,7 @@ int CDECL MSVCRT__wstat(const MSVCRT_wchar_t* path, struct MSVCRT__stat * buf)
*/
long
CDECL
_tell
(
int
fd
)
{
return
_lseek
(
fd
,
0
,
SEEK_CUR
);
return
MSVCRT_
_lseek
(
fd
,
0
,
SEEK_CUR
);
}
/*********************************************************************
...
...
@@ -1949,7 +1949,7 @@ long CDECL _tell(int fd)
*/
__int64
CDECL
_telli64
(
int
fd
)
{
return
_lseeki64
(
fd
,
0
,
SEEK_CUR
);
return
MSVCRT_
_lseeki64
(
fd
,
0
,
SEEK_CUR
);
}
/*********************************************************************
...
...
@@ -2055,7 +2055,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
/* If appending, go to EOF */
if
(
MSVCRT_fdesc
[
fd
].
wxflag
&
WX_APPEND
)
_lseek
(
fd
,
0
,
FILE_END
);
MSVCRT_
_lseek
(
fd
,
0
,
FILE_END
);
if
(
!
(
MSVCRT_fdesc
[
fd
].
wxflag
&
WX_TEXT
))
{
...
...
@@ -2711,7 +2711,7 @@ int CDECL MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
file
->
_flag
&=
~
(
MSVCRT__IOREAD
|
MSVCRT__IOWRT
);
}
return
(
_lseeki64
(
file
->
_file
,
*
pos
,
SEEK_SET
)
==
-
1
)
?
-
1
:
0
;
return
(
MSVCRT_
_lseeki64
(
file
->
_file
,
*
pos
,
SEEK_SET
)
==
-
1
)
?
-
1
:
0
;
}
/*********************************************************************
...
...
@@ -2741,7 +2741,7 @@ int CDECL MSVCRT_fgetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos)
/* This code has been lifted form the MSVCRT_ftell function */
int
off
=
0
;
*
pos
=
_lseeki64
(
file
->
_file
,
0
,
SEEK_CUR
);
*
pos
=
MSVCRT_
_lseeki64
(
file
->
_file
,
0
,
SEEK_CUR
);
if
(
*
pos
==
-
1
)
return
-
1
;
...
...
dlls/msvcrt/msvcrt.spec
View file @
b43fd312
...
...
@@ -233,8 +233,8 @@
@ cdecl _fgetwchar()
@ cdecl _filbuf(ptr) MSVCRT__filbuf
# extern _fileinfo
@ cdecl _filelength(long)
@ cdecl -ret64 _filelengthi64(long)
@ cdecl _filelength(long)
MSVCRT__filelength
@ cdecl -ret64 _filelengthi64(long)
MSVCRT__filelengthi64
@ cdecl _fileno(ptr) MSVCRT__fileno
@ cdecl _findclose(long) MSVCRT__findclose
@ cdecl _findfirst(str ptr) MSVCRT__findfirst
...
...
@@ -334,14 +334,14 @@
@ cdecl _loaddll(str)
@ cdecl -i386 _local_unwind2(ptr long)
@ cdecl _lock(long)
@ cdecl _locking(long long long)
@ cdecl _locking(long long long)
MSVCRT__locking
@ cdecl _logb( double )
@ cdecl -i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long)
@ cdecl _lrotr(long long)
@ cdecl _lsearch(ptr ptr long long ptr)
@ cdecl _lseek(long long long)
@ cdecl -ret64 _lseeki64(long double long)
@ cdecl _lseek(long long long)
MSVCRT__lseek
@ cdecl -ret64 _lseeki64(long double long)
MSVCRT__lseeki64
@ cdecl _ltoa(long ptr long) ntdll._ltoa
@ cdecl _ltow(long ptr long) ntdll._ltow
@ cdecl _makepath(ptr str str str str)
...
...
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