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
945bb366
Commit
945bb366
authored
Jun 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
struct _stat layout is different between crtdll and msvcrt.
parent
19219484
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
2 deletions
+66
-2
crtdll.spec
dlls/crtdll/crtdll.spec
+2
-2
crtdll_main.c
dlls/crtdll/crtdll_main.c
+64
-0
No files found.
dlls/crtdll/crtdll.spec
View file @
945bb366
...
...
@@ -112,7 +112,7 @@ init CRTDLL_Init
@ forward _fputchar msvcrt._fputchar
@ forward _fputwchar msvcrt._fputwchar
@ forward _fsopen msvcrt._fsopen
@
forward _fstat msvcrt.
_fstat
@
cdecl _fstat(long ptr) CRTDLL_
_fstat
@ forward _ftime msvcrt._ftime
@ forward _ftol msvcrt._ftol
@ forward _fullpath msvcrt._fullpath
...
...
@@ -279,7 +279,7 @@ init CRTDLL_Init
@ forward _spawnvp msvcrt._spawnvp
@ forward _spawnvpe msvcrt._spawnvpe
@ forward _splitpath msvcrt._splitpath
@
forward _stat msvcrt.
_stat
@
cdecl _stat(str ptr) CRTDLL_
_stat
@ forward _statusfp msvcrt._statusfp
@ forward _strcmpi msvcrt._strcmpi
@ forward _strdate msvcrt._strdate
...
...
dlls/crtdll/crtdll_main.c
View file @
945bb366
...
...
@@ -17,9 +17,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "windef.h"
#include "winbase.h"
#define USE_MSVCRT_PREFIX
#include "msvcrt/sys/stat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
crtdll
);
...
...
@@ -38,6 +41,41 @@ unsigned int CRTDLL__osminor_dll;
unsigned
int
CRTDLL__osmode_dll
;
unsigned
int
CRTDLL__osversion_dll
;
/* dev_t is a short in crtdll but an unsigned int in msvcrt */
typedef
short
crtdll_dev_t
;
struct
crtdll_stat
{
crtdll_dev_t
st_dev
;
_ino_t
st_ino
;
unsigned
short
st_mode
;
short
st_nlink
;
short
st_uid
;
short
st_gid
;
crtdll_dev_t
st_rdev
;
_off_t
st_size
;
MSVCRT
(
time_t
)
st_atime
;
MSVCRT
(
time_t
)
st_mtime
;
MSVCRT
(
time_t
)
st_ctime
;
};
/* convert struct _stat from crtdll format to msvcrt format */
static
void
convert_struct_stat
(
struct
crtdll_stat
*
dst
,
const
struct
_stat
*
src
)
{
dst
->
st_dev
=
src
->
st_dev
;
dst
->
st_ino
=
src
->
st_ino
;
dst
->
st_mode
=
src
->
st_mode
;
dst
->
st_nlink
=
src
->
st_nlink
;
dst
->
st_uid
=
src
->
st_uid
;
dst
->
st_gid
=
src
->
st_gid
;
dst
->
st_rdev
=
src
->
st_rdev
;
dst
->
st_size
=
src
->
st_size
;
dst
->
st_atime
=
src
->
st_atime
;
dst
->
st_mtime
=
src
->
st_mtime
;
dst
->
st_ctime
=
src
->
st_ctime
;
}
/*********************************************************************
* CRTDLL_MainInit (CRTDLL.init)
*/
...
...
@@ -69,3 +107,29 @@ void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards
int
new_mode
=
0
;
__getmainargs
(
argc
,
argv
,
envp
,
expand_wildcards
,
&
new_mode
);
}
/*********************************************************************
* _fstat (CRTDLL.@)
*/
int
CRTDLL__fstat
(
int
fd
,
struct
crtdll_stat
*
buf
)
{
struct
_stat
st
;
int
ret
;
if
(
!
(
ret
=
_fstat
(
fd
,
&
st
)))
convert_struct_stat
(
buf
,
&
st
);
return
ret
;
}
/*********************************************************************
* _stat (CRTDLL.@)
*/
int
CRTDLL__stat
(
const
char
*
path
,
struct
crtdll_stat
*
buf
)
{
struct
_stat
st
;
int
ret
;
if
(
!
(
ret
=
_stat
(
path
,
&
st
)))
convert_struct_stat
(
buf
,
&
st
);
return
ret
;
}
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