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
ac760a47
Commit
ac760a47
authored
May 23, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix the stat and finddata structures for 64-bit.
parent
4a7b3460
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
134 deletions
+126
-134
file.c
dlls/msvcrt/file.c
+5
-5
msvcrt.h
dlls/msvcrt/msvcrt.h
+118
-69
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+3
-3
headers.c
dlls/msvcrt/tests/headers.c
+0
-57
No files found.
dlls/msvcrt/file.c
View file @
ac760a47
...
@@ -1838,7 +1838,7 @@ int CDECL _setmode(int fd,int mode)
...
@@ -1838,7 +1838,7 @@ int CDECL _setmode(int fd,int mode)
/*********************************************************************
/*********************************************************************
* _stat64 (MSVCRT.@)
* _stat64 (MSVCRT.@)
*/
*/
int
CDECL
MSVCRT_
_
stat64
(
const
char
*
path
,
struct
MSVCRT__stat64
*
buf
)
int
CDECL
MSVCRT_stat64
(
const
char
*
path
,
struct
MSVCRT__stat64
*
buf
)
{
{
DWORD
dw
;
DWORD
dw
;
WIN32_FILE_ATTRIBUTE_DATA
hfi
;
WIN32_FILE_ATTRIBUTE_DATA
hfi
;
...
@@ -1904,12 +1904,12 @@ int CDECL MSVCRT__stat64(const char* path, struct MSVCRT__stat64 * buf)
...
@@ -1904,12 +1904,12 @@ int CDECL MSVCRT__stat64(const char* path, struct MSVCRT__stat64 * buf)
/*********************************************************************
/*********************************************************************
* _stati64 (MSVCRT.@)
* _stati64 (MSVCRT.@)
*/
*/
int
CDECL
MSVCRT_
_
stati64
(
const
char
*
path
,
struct
MSVCRT__stati64
*
buf
)
int
CDECL
MSVCRT_stati64
(
const
char
*
path
,
struct
MSVCRT__stati64
*
buf
)
{
{
int
ret
;
int
ret
;
struct
MSVCRT__stat64
buf64
;
struct
MSVCRT__stat64
buf64
;
ret
=
MSVCRT_
_
stat64
(
path
,
&
buf64
);
ret
=
MSVCRT_stat64
(
path
,
&
buf64
);
if
(
!
ret
)
if
(
!
ret
)
msvcrt_stat64_to_stati64
(
&
buf64
,
buf
);
msvcrt_stat64_to_stati64
(
&
buf64
,
buf
);
return
ret
;
return
ret
;
...
@@ -1918,11 +1918,11 @@ int CDECL MSVCRT__stati64(const char* path, struct MSVCRT__stati64 * buf)
...
@@ -1918,11 +1918,11 @@ int CDECL MSVCRT__stati64(const char* path, struct MSVCRT__stati64 * buf)
/*********************************************************************
/*********************************************************************
* _stat (MSVCRT.@)
* _stat (MSVCRT.@)
*/
*/
int
CDECL
MSVCRT_
_
stat
(
const
char
*
path
,
struct
MSVCRT__stat
*
buf
)
int
CDECL
MSVCRT_stat
(
const
char
*
path
,
struct
MSVCRT__stat
*
buf
)
{
int
ret
;
{
int
ret
;
struct
MSVCRT__stat64
buf64
;
struct
MSVCRT__stat64
buf64
;
ret
=
MSVCRT_
_
stat64
(
path
,
&
buf64
);
ret
=
MSVCRT_stat64
(
path
,
&
buf64
);
if
(
!
ret
)
if
(
!
ret
)
msvcrt_stat64_to_stat
(
&
buf64
,
buf
);
msvcrt_stat64_to_stat
(
&
buf64
,
buf
);
return
ret
;
return
ret
;
...
...
dlls/msvcrt/msvcrt.h
View file @
ac760a47
...
@@ -45,22 +45,20 @@ typedef unsigned short MSVCRT_wchar_t;
...
@@ -45,22 +45,20 @@ typedef unsigned short MSVCRT_wchar_t;
typedef
unsigned
short
MSVCRT_wint_t
;
typedef
unsigned
short
MSVCRT_wint_t
;
typedef
unsigned
short
MSVCRT_wctype_t
;
typedef
unsigned
short
MSVCRT_wctype_t
;
typedef
unsigned
short
MSVCRT__ino_t
;
typedef
unsigned
short
MSVCRT__ino_t
;
typedef
unsigned
long
MSVCRT__fsize_t
;
typedef
unsigned
int
MSVCRT__fsize_t
;
#ifdef _WIN64
#ifdef _WIN64
typedef
unsigned
__int64
MSVCRT_size_t
;
typedef
unsigned
__int64
MSVCRT_size_t
;
typedef
__int64
MSVCRT_intptr_t
;
typedef
__int64
MSVCRT_intptr_t
;
typedef
unsigned
__int64
MSVCRT_uintptr_t
;
typedef
unsigned
__int64
MSVCRT_uintptr_t
;
typedef
__int64
MSVCRT_time_t
;
#else
#else
typedef
unsigned
long
MSVCRT_size_t
;
typedef
unsigned
long
MSVCRT_size_t
;
typedef
long
MSVCRT_intptr_t
;
typedef
long
MSVCRT_intptr_t
;
typedef
unsigned
long
MSVCRT_uintptr_t
;
typedef
unsigned
long
MSVCRT_uintptr_t
;
typedef
long
MSVCRT_time_t
;
#endif
#endif
typedef
unsigned
int
MSVCRT__dev_t
;
typedef
unsigned
int
MSVCRT__dev_t
;
typedef
int
MSVCRT__off_t
;
typedef
int
MSVCRT__off_t
;
typedef
long
MSVCRT_clock_t
;
typedef
long
MSVCRT_clock_t
;
typedef
long
MSVCRT___time32_t
;
typedef
int
MSVCRT___time32_t
;
typedef
__int64
MSVCRT___time64_t
;
typedef
__int64
MSVCRT___time64_t
;
typedef
__int64
MSVCRT_fpos_t
;
typedef
__int64
MSVCRT_fpos_t
;
...
@@ -299,40 +297,76 @@ struct MSVCRT__diskfree_t {
...
@@ -299,40 +297,76 @@ struct MSVCRT__diskfree_t {
unsigned
int
bytes_per_sector
;
unsigned
int
bytes_per_sector
;
};
};
struct
MSVCRT__finddata_t
{
struct
MSVCRT__finddata
32
_t
{
unsigned
attrib
;
unsigned
int
attrib
;
MSVCRT_
time_t
time_create
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
time_t
time_access
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
time_t
time_write
;
MSVCRT_
__time32_t
time_write
;
MSVCRT__fsize_t
size
;
MSVCRT__fsize_t
size
;
char
name
[
260
];
char
name
[
260
];
};
};
struct
MSVCRT__finddatai64_t
{
struct
MSVCRT__finddata
32
i64_t
{
unsigned
attrib
;
unsigned
int
attrib
;
MSVCRT_
time_t
time_create
;
MSVCRT_
__time32_t
time_create
;
MSVCRT_
time_t
time_access
;
MSVCRT_
__time32_t
time_access
;
MSVCRT_
time_t
time_write
;
MSVCRT_
__time32_t
time_write
;
__int64
size
;
__int64
size
;
char
name
[
260
];
char
name
[
260
];
};
};
struct
MSVCRT__
wfinddata
_t
{
struct
MSVCRT__
finddata64i32
_t
{
unsigned
attrib
;
unsigned
int
attrib
;
MSVCRT_
time_t
time_create
;
MSVCRT_
__time64_t
time_create
;
MSVCRT_
time_t
time_access
;
MSVCRT_
__time64_t
time_access
;
MSVCRT_
time_t
time_write
;
MSVCRT_
__time64_t
time_write
;
MSVCRT__fsize_t
size
;
MSVCRT__fsize_t
size
;
MSVCRT_wchar_t
name
[
260
];
char
name
[
260
];
};
};
struct
MSVCRT__wfinddatai64_t
{
struct
MSVCRT__finddata64_t
{
unsigned
attrib
;
unsigned
int
attrib
;
MSVCRT_time_t
time_create
;
MSVCRT___time64_t
time_create
;
MSVCRT_time_t
time_access
;
MSVCRT___time64_t
time_access
;
MSVCRT_time_t
time_write
;
MSVCRT___time64_t
time_write
;
__int64
size
;
__int64
size
;
MSVCRT_wchar_t
name
[
260
];
char
name
[
260
];
};
struct
MSVCRT__wfinddata32_t
{
unsigned
int
attrib
;
MSVCRT___time32_t
time_create
;
MSVCRT___time32_t
time_access
;
MSVCRT___time32_t
time_write
;
MSVCRT__fsize_t
size
;
MSVCRT_wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata32i64_t
{
unsigned
int
attrib
;
MSVCRT___time32_t
time_create
;
MSVCRT___time32_t
time_access
;
MSVCRT___time32_t
time_write
;
__int64
size
;
MSVCRT_wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata64i32_t
{
unsigned
int
attrib
;
MSVCRT___time64_t
time_create
;
MSVCRT___time64_t
time_access
;
MSVCRT___time64_t
time_write
;
MSVCRT__fsize_t
size
;
MSVCRT_wchar_t
name
[
260
];
};
struct
MSVCRT__wfinddata64_t
{
unsigned
int
attrib
;
MSVCRT___time64_t
time_create
;
MSVCRT___time64_t
time_access
;
MSVCRT___time64_t
time_write
;
__int64
size
;
MSVCRT_wchar_t
name
[
260
];
};
};
struct
MSVCRT___utimbuf32
struct
MSVCRT___utimbuf32
...
@@ -352,46 +386,46 @@ struct MSVCRT___utimbuf64
...
@@ -352,46 +386,46 @@ struct MSVCRT___utimbuf64
#undef st_ctime
#undef st_ctime
#undef st_mtime
#undef st_mtime
struct
MSVCRT__stat
{
struct
MSVCRT__stat
32
{
MSVCRT__dev_t
st_dev
;
MSVCRT__dev_t
st_dev
;
MSVCRT__ino_t
st_ino
;
MSVCRT__ino_t
st_ino
;
unsigned
short
st_mode
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_nlink
;
short
st_uid
;
short
st_uid
;
short
st_gid
;
short
st_gid
;
MSVCRT__dev_t
st_rdev
;
MSVCRT__dev_t
st_rdev
;
MSVCRT__off_t
st_size
;
MSVCRT__off_t
st_size
;
MSVCRT_
time_t
st_atime
;
MSVCRT_
__time32_t
st_atime
;
MSVCRT_
time_t
st_mtime
;
MSVCRT_
__time32_t
st_mtime
;
MSVCRT_
time_t
st_ctime
;
MSVCRT_
__time32_t
st_ctime
;
};
};
struct
MSVCRT_
stat
{
struct
MSVCRT_
_stat32i64
{
MSVCRT__dev_t
st_dev
;
MSVCRT__dev_t
st_dev
;
MSVCRT__ino_t
st_ino
;
MSVCRT__ino_t
st_ino
;
unsigned
short
st_mode
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_nlink
;
short
st_uid
;
short
st_uid
;
short
st_gid
;
short
st_gid
;
MSVCRT__dev_t
st_rdev
;
MSVCRT__dev_t
st_rdev
;
MSVCRT__off_t
st_size
;
__int64
DECLSPEC_ALIGN
(
8
)
st_size
;
MSVCRT_
time_t
st_atime
;
MSVCRT_
__time32_t
st_atime
;
MSVCRT_
time_t
st_mtime
;
MSVCRT_
__time32_t
st_mtime
;
MSVCRT_
time_t
st_ctime
;
MSVCRT_
__time32_t
st_ctime
;
};
};
struct
MSVCRT__stat
i64
{
struct
MSVCRT__stat
64i32
{
MSVCRT__dev_t
st_dev
;
MSVCRT__dev_t
st_dev
;
MSVCRT__ino_t
st_ino
;
MSVCRT__ino_t
st_ino
;
unsigned
short
st_mode
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_nlink
;
short
st_uid
;
short
st_uid
;
short
st_gid
;
short
st_gid
;
MSVCRT__dev_t
st_rdev
;
MSVCRT__dev_t
st_rdev
;
__int64
DECLSPEC_ALIGN
(
8
)
st_size
;
MSVCRT__off_t
st_size
;
MSVCRT_
time_t
st_atime
;
MSVCRT_
__time64_t
st_atime
;
MSVCRT_
time_t
st_mtime
;
MSVCRT_
__time64_t
st_mtime
;
MSVCRT_
time_t
st_ctime
;
MSVCRT_
__time64_t
st_ctime
;
};
};
struct
MSVCRT__stat64
{
struct
MSVCRT__stat64
{
...
@@ -408,6 +442,22 @@ struct MSVCRT__stat64 {
...
@@ -408,6 +442,22 @@ struct MSVCRT__stat64 {
MSVCRT___time64_t
st_ctime
;
MSVCRT___time64_t
st_ctime
;
};
};
#ifdef _WIN64
#define MSVCRT__finddata_t MSVCRT__finddata64i32_t
#define MSVCRT__finddatai64_t MSVCRT__finddata64_t
#define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t
#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t
#define MSVCRT__stat MSVCRT__stat64i32
#define MSVCRT__stati64 MSVCRT__stat64
#else
#define MSVCRT__finddata_t MSVCRT__finddata32_t
#define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t
#define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t
#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t
#define MSVCRT__stat MSVCRT__stat32
#define MSVCRT__stati64 MSVCRT__stat32i64
#endif
#define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
#define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
#define MSVCRT_EOF (-1)
#define MSVCRT_EOF (-1)
#define MSVCRT_TMP_MAX 0x7fff
#define MSVCRT_TMP_MAX 0x7fff
...
@@ -675,7 +725,6 @@ MSVCRT_FILE* __cdecl MSVCRT__iob_func(void);
...
@@ -675,7 +725,6 @@ MSVCRT_FILE* __cdecl MSVCRT__iob_func(void);
MSVCRT_clock_t
__cdecl
MSVCRT_clock
(
void
);
MSVCRT_clock_t
__cdecl
MSVCRT_clock
(
void
);
MSVCRT___time32_t
__cdecl
MSVCRT__time32
(
MSVCRT___time32_t
*
);
MSVCRT___time32_t
__cdecl
MSVCRT__time32
(
MSVCRT___time32_t
*
);
MSVCRT___time64_t
__cdecl
MSVCRT__time64
(
MSVCRT___time64_t
*
);
MSVCRT___time64_t
__cdecl
MSVCRT__time64
(
MSVCRT___time64_t
*
);
MSVCRT_time_t
__cdecl
MSVCRT_time
(
MSVCRT_time_t
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__fdopen
(
int
,
const
char
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__fdopen
(
int
,
const
char
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__wfdopen
(
int
,
const
MSVCRT_wchar_t
*
);
MSVCRT_FILE
*
__cdecl
MSVCRT__wfdopen
(
int
,
const
MSVCRT_wchar_t
*
);
int
__cdecl
MSVCRT_vsnprintf
(
char
*
str
,
unsigned
int
len
,
const
char
*
format
,
__ms_va_list
valist
);
int
__cdecl
MSVCRT_vsnprintf
(
char
*
str
,
unsigned
int
len
,
const
char
*
format
,
__ms_va_list
valist
);
...
...
dlls/msvcrt/msvcrt.spec
View file @
ac760a47
...
@@ -482,9 +482,9 @@
...
@@ -482,9 +482,9 @@
@ cdecl _spawnvp(long str ptr)
@ cdecl _spawnvp(long str ptr)
@ cdecl _spawnvpe(long str ptr ptr)
@ cdecl _spawnvpe(long str ptr ptr)
@ cdecl _splitpath(str ptr ptr ptr ptr) ntdll._splitpath
@ cdecl _splitpath(str ptr ptr ptr ptr) ntdll._splitpath
@ cdecl _stat(str ptr) MSVCRT_
_
stat
@ cdecl _stat(str ptr) MSVCRT_stat
@ cdecl _stat64(str ptr) MSVCRT_
_
stat64
@ cdecl _stat64(str ptr) MSVCRT_stat64
@ cdecl _stati64(str ptr) MSVCRT_
_
stati64
@ cdecl _stati64(str ptr) MSVCRT_stati64
@ cdecl _statusfp()
@ cdecl _statusfp()
@ cdecl _strcmpi(str str) ntdll._strcmpi
@ cdecl _strcmpi(str str) ntdll._strcmpi
@ cdecl _strdate(ptr)
@ cdecl _strdate(ptr)
...
...
dlls/msvcrt/tests/headers.c
View file @
ac760a47
...
@@ -87,7 +87,6 @@ static void test_types(void)
...
@@ -87,7 +87,6 @@ static void test_types(void)
CHECK_TYPE
(
_dev_t
);
CHECK_TYPE
(
_dev_t
);
CHECK_TYPE
(
_off_t
);
CHECK_TYPE
(
_off_t
);
CHECK_TYPE
(
clock_t
);
CHECK_TYPE
(
clock_t
);
CHECK_TYPE
(
time_t
);
CHECK_TYPE
(
__time32_t
);
CHECK_TYPE
(
__time32_t
);
CHECK_TYPE
(
__time64_t
);
CHECK_TYPE
(
__time64_t
);
CHECK_TYPE
(
fpos_t
);
CHECK_TYPE
(
fpos_t
);
...
@@ -237,62 +236,6 @@ static void test_structs(void)
...
@@ -237,62 +236,6 @@ static void test_structs(void)
CHECK_FIELD
(
_stat
,
st_atime
);
CHECK_FIELD
(
_stat
,
st_atime
);
CHECK_FIELD
(
_stat
,
st_mtime
);
CHECK_FIELD
(
_stat
,
st_mtime
);
CHECK_FIELD
(
_stat
,
st_ctime
);
CHECK_FIELD
(
_stat
,
st_ctime
);
CHECK_FIELD
(
_stat
,
st_dev
);
CHECK_FIELD
(
_stat
,
st_ino
);
CHECK_FIELD
(
_stat
,
st_mode
);
CHECK_FIELD
(
_stat
,
st_nlink
);
CHECK_FIELD
(
_stat
,
st_uid
);
CHECK_FIELD
(
_stat
,
st_gid
);
CHECK_FIELD
(
_stat
,
st_rdev
);
CHECK_FIELD
(
_stat
,
st_size
);
CHECK_FIELD
(
_stat
,
st_atime
);
CHECK_FIELD
(
_stat
,
st_mtime
);
CHECK_FIELD
(
_stat
,
st_ctime
);
CHECK_FIELD
(
_stat
,
st_dev
);
CHECK_FIELD
(
_stat
,
st_ino
);
CHECK_FIELD
(
_stat
,
st_mode
);
CHECK_FIELD
(
_stat
,
st_nlink
);
CHECK_FIELD
(
_stat
,
st_uid
);
CHECK_FIELD
(
_stat
,
st_gid
);
CHECK_FIELD
(
_stat
,
st_rdev
);
CHECK_FIELD
(
_stat
,
st_size
);
CHECK_FIELD
(
_stat
,
st_atime
);
CHECK_FIELD
(
_stat
,
st_mtime
);
CHECK_FIELD
(
_stat
,
st_ctime
);
CHECK_STRUCT
(
stat
);
CHECK_FIELD
(
stat
,
st_dev
);
CHECK_FIELD
(
stat
,
st_ino
);
CHECK_FIELD
(
stat
,
st_mode
);
CHECK_FIELD
(
stat
,
st_nlink
);
CHECK_FIELD
(
stat
,
st_uid
);
CHECK_FIELD
(
stat
,
st_gid
);
CHECK_FIELD
(
stat
,
st_rdev
);
CHECK_FIELD
(
stat
,
st_size
);
CHECK_FIELD
(
stat
,
st_atime
);
CHECK_FIELD
(
stat
,
st_mtime
);
CHECK_FIELD
(
stat
,
st_ctime
);
CHECK_FIELD
(
stat
,
st_dev
);
CHECK_FIELD
(
stat
,
st_ino
);
CHECK_FIELD
(
stat
,
st_mode
);
CHECK_FIELD
(
stat
,
st_nlink
);
CHECK_FIELD
(
stat
,
st_uid
);
CHECK_FIELD
(
stat
,
st_gid
);
CHECK_FIELD
(
stat
,
st_rdev
);
CHECK_FIELD
(
stat
,
st_size
);
CHECK_FIELD
(
stat
,
st_atime
);
CHECK_FIELD
(
stat
,
st_mtime
);
CHECK_FIELD
(
stat
,
st_ctime
);
CHECK_FIELD
(
stat
,
st_dev
);
CHECK_FIELD
(
stat
,
st_ino
);
CHECK_FIELD
(
stat
,
st_mode
);
CHECK_FIELD
(
stat
,
st_nlink
);
CHECK_FIELD
(
stat
,
st_uid
);
CHECK_FIELD
(
stat
,
st_gid
);
CHECK_FIELD
(
stat
,
st_rdev
);
CHECK_FIELD
(
stat
,
st_size
);
CHECK_FIELD
(
stat
,
st_atime
);
CHECK_FIELD
(
stat
,
st_mtime
);
CHECK_FIELD
(
stat
,
st_ctime
);
CHECK_STRUCT
(
_stati64
);
CHECK_STRUCT
(
_stati64
);
CHECK_FIELD
(
_stati64
,
st_dev
);
CHECK_FIELD
(
_stati64
,
st_dev
);
CHECK_FIELD
(
_stati64
,
st_ino
);
CHECK_FIELD
(
_stati64
,
st_ino
);
...
...
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