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
e101f6db
Commit
e101f6db
authored
Aug 14, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up a few inter-dll dependencies. Added a few imports.
parent
c7e7df8b
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
119 additions
and
201 deletions
+119
-201
Makefile.in
dlls/Makefile.in
+4
-3
advapi.c
dlls/advapi32/advapi.c
+4
-5
avifile.c
dlls/avifil32/avifile.c
+2
-2
comdlg32.spec
dlls/commdlg/comdlg32.spec
+1
-0
crtdll_main.c
dlls/crtdll/crtdll_main.c
+53
-32
wcstring.c
dlls/crtdll/wcstring.c
+2
-1
Makefile.in
dlls/imm32/Makefile.in
+1
-0
imm32.spec
dlls/imm32/imm32.spec
+2
-0
wowthunk.c
dlls/kernel/wowthunk.c
+2
-2
compobj.c
dlls/ole32/compobj.c
+4
-6
Makefile.in
dlls/opengl32/Makefile.in
+1
-1
opengl32.spec
dlls/opengl32/opengl32.spec
+2
-1
Makefile.in
dlls/setupapi/Makefile.in
+1
-1
setupapi.spec
dlls/setupapi/setupapi.spec
+1
-0
Makefile.in
dlls/shlwapi/Makefile.in
+1
-1
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+3
-2
string.c
dlls/shlwapi/string.c
+19
-1
dos_fs.c
files/dos_fs.c
+7
-6
file.c
files/file.c
+6
-6
Makefile.in
win32/Makefile.in
+0
-1
error.c
win32/error.c
+0
-125
file.c
win32/file.c
+3
-5
No files found.
dlls/Makefile.in
View file @
e101f6db
...
...
@@ -385,6 +385,7 @@ dsound/libdsound.so: libwinmm.so libkernel32.so
gdi/libgdi32.so
:
libkernel32.so
icmp/libicmp.so
:
libkernel32.so
imagehlp/libimagehlp.so
:
libkernel32.so
imm32/libimm32.so
:
libkernel32.so
lzexpand/liblz32.so
:
libkernel32.so
mpr/libmpr.so
:
libkernel32.so
msacm/libmsacm32.so
:
libwinmm.so libkernel32.so
...
...
@@ -393,14 +394,14 @@ ole32/libole32.so: libadvapi32.so libuser32.so libgdi32.so librpcrt4.so libkerne
oleaut32/liboleaut32.so
:
libole32.so libgdi32.so libkernel32.so
olecli/libolecli32.so
:
libole32.so libolesvr32.so libgdi32.so
olepro32/libolepro32.so
:
liboleaut32.so
opengl32/libopengl32.so
:
libx11drv.so
opengl32/libopengl32.so
:
libx11drv.so
libkernel32.so
psapi/libpsapi.so
:
libkernel32.so
richedit/libriched32.so
:
libuser32.so libkernel32.so
serialui/libserialui.so
:
libuser32.so libadvapi32.so libkernel32.so
setupapi/libsetupapi.so
:
libkernel32.so
setupapi/libsetupapi.so
:
lib
advapi32.so lib
kernel32.so
shell32/libshell32.so
:
libole32.so libshlwapi.so libcomctl32.so libadvapi32.so libuser32.so libgdi32.so libkernel32.so
shfolder/libshfolder.so
:
libshell32.so
shlwapi/libshlwapi.so
:
libadvapi32.so libuser32.so libkernel32.so
shlwapi/libshlwapi.so
:
libadvapi32.so libuser32.so lib
gdi32.so lib
kernel32.so
tapi32/libtapi32.so
:
libkernel32.so
ttydrv/libttydrv.so
:
libuser32.so libgdi32.so libkernel32.so
urlmon/liburlmon.so
:
libole32.so
...
...
dlls/advapi32/advapi.c
View file @
e101f6db
...
...
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <pwd.h>
#include "winbase.h"
#include "windef.h"
...
...
@@ -25,11 +26,9 @@ GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
size_t
len
;
char
*
name
;
name
=
getlogin
();
#if 0
/* FIXME: should use getpwuid() here */
if (!name) name=cuserid(NULL);
#endif
struct
passwd
*
pwd
=
getpwuid
(
getuid
()
);
if
(
!
pwd
)
return
0
;
name
=
pwd
->
pw_name
;
len
=
name
?
strlen
(
name
)
:
0
;
if
(
!
len
||
!
lpSize
||
len
>
*
lpSize
)
{
if
(
lpszName
)
*
lpszName
=
0
;
...
...
dlls/avifil32/avifile.c
View file @
e101f6db
...
...
@@ -476,8 +476,8 @@ HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed,PAVISTREAM ppsS
icf
.
lQuality
=
aco
->
dwQuality
;
icf
.
lKeyRate
=
aco
->
dwKeyFrameEvery
;
icf
.
GetData
=
(
LONG
(
*
)(
LPARAM
,
LONG
,
LPVOID
,
LONG
))
0xdead4242
;
icf
.
PutData
=
(
LONG
(
*
)(
LPARAM
,
LONG
,
LPVOID
,
LONG
))
0xdead4243
;
icf
.
GetData
=
(
void
*
)
0xdead4242
;
icf
.
PutData
=
(
void
*
)
0xdead4243
;
ICSendMessage
(
as
->
hic
,
ICM_COMPRESS_FRAMES_INFO
,(
LPARAM
)
&
icf
,
sizeof
(
icf
));
}
return
S_OK
;
...
...
dlls/commdlg/comdlg32.spec
View file @
e101f6db
...
...
@@ -10,6 +10,7 @@ import user32.dll
import winspool.drv
import gdi32.dll
import kernel32.dll
import ntdll.dll
0 stub ArrowBtnWndProc
1 stdcall ChooseColorA(ptr) ChooseColorA
...
...
dlls/crtdll/crtdll_main.c
View file @
e101f6db
...
...
@@ -100,6 +100,7 @@ typedef VOID (*new_handler_type)(VOID);
static
new_handler_type
new_handler
;
CRTDLL_FILE
*
__cdecl
CRTDLL__fdopen
(
INT
handle
,
LPCSTR
mode
);
INT
__cdecl
CRTDLL_fgetc
(
CRTDLL_FILE
*
file
);
/*********************************************************************
* CRTDLL_MainInit (CRTDLL.init)
...
...
@@ -117,6 +118,24 @@ BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
/*********************************************************************
* malloc (CRTDLL.427)
*/
VOID
*
__cdecl
CRTDLL_malloc
(
DWORD
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
}
/*********************************************************************
* _strdup (CRTDLL.285)
*/
LPSTR
__cdecl
CRTDLL__strdup
(
LPCSTR
ptr
)
{
LPSTR
ret
=
CRTDLL_malloc
(
strlen
(
ptr
)
+
1
);
if
(
ret
)
strcpy
(
ret
,
ptr
);
return
ret
;
}
/*********************************************************************
* _GetMainArgs (CRTDLL.022)
*/
LPSTR
*
__cdecl
CRTDLL__GetMainArgs
(
LPDWORD
argc
,
LPSTR
**
argv
,
...
...
@@ -134,8 +153,7 @@ LPSTR * __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
if
(
CRTDLL_acmdln_dll
!=
NULL
)
HeapFree
(
GetProcessHeap
(),
0
,
CRTDLL_acmdln_dll
);
CRTDLL_acmdln_dll
=
cmdline
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
GetCommandLineA
()
);
CRTDLL_acmdln_dll
=
cmdline
=
CRTDLL__strdup
(
GetCommandLineA
()
);
TRACE
(
"got '%s'
\n
"
,
cmdline
);
version
=
GetVersion
();
...
...
@@ -166,8 +184,7 @@ LPSTR * __cdecl CRTDLL__GetMainArgs(LPDWORD argc,LPSTR **argv,
sizeof
(
char
*
)
*
(
xargc
+
1
));
if
(
strlen
(
cmdline
+
afterlastspace
))
{
xargv
[
xargc
]
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
cmdline
+
afterlastspace
);
xargv
[
xargc
]
=
CRTDLL__strdup
(
cmdline
+
afterlastspace
);
xargc
++
;
if
(
!
last_arg
)
/* need to seek to the next arg ? */
{
...
...
@@ -866,15 +883,6 @@ INT __cdecl CRTDLL_rand()
/*********************************************************************
* putchar (CRTDLL.442)
*/
void
__cdecl
CRTDLL_putchar
(
INT
x
)
{
putchar
(
x
);
}
/*********************************************************************
* fputc (CRTDLL.374)
*/
INT
__cdecl
CRTDLL_fputc
(
INT
c
,
CRTDLL_FILE
*
file
)
...
...
@@ -888,6 +896,15 @@ INT __cdecl CRTDLL_fputc( INT c, CRTDLL_FILE *file )
/*********************************************************************
* putchar (CRTDLL.442)
*/
void
__cdecl
CRTDLL_putchar
(
INT
x
)
{
CRTDLL_fputc
(
x
,
CRTDLL_stdout
);
}
/*********************************************************************
* fputs (CRTDLL.375)
*/
INT
__cdecl
CRTDLL_fputs
(
LPCSTR
s
,
CRTDLL_FILE
*
file
)
...
...
@@ -905,7 +922,7 @@ INT __cdecl CRTDLL_fputs( LPCSTR s, CRTDLL_FILE *file )
INT
__cdecl
CRTDLL_puts
(
LPCSTR
s
)
{
TRACE
(
"%s
\n
"
,
s
);
return
puts
(
s
);
return
CRTDLL_fputs
(
s
,
CRTDLL_stdout
);
}
...
...
@@ -981,7 +998,7 @@ LPSTR __cdecl CRTDLL_gets(LPSTR buf)
* windows95's ftp.exe.
*/
for
(
cc
=
fgetc
(
stdin
);
cc
!=
EOF
&&
cc
!=
'\n'
;
cc
=
fgetc
(
stdin
))
for
(
cc
=
CRTDLL_fgetc
(
CRTDLL_stdin
);
cc
!=
EOF
&&
cc
!=
'\n'
;
cc
=
CRTDLL_fgetc
(
CRTDLL_
stdin
))
if
(
cc
!=
'\r'
)
*
buf
++
=
(
char
)
cc
;
*
buf
=
'\0'
;
...
...
@@ -1099,14 +1116,6 @@ VOID __cdecl CRTDLL_longjmp(jmp_buf env, int val)
}
/*********************************************************************
* malloc (CRTDLL.427)
*/
VOID
*
__cdecl
CRTDLL_malloc
(
DWORD
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
}
/*********************************************************************
* new (CRTDLL.001)
*/
VOID
*
__cdecl
CRTDLL_new
(
DWORD
size
)
...
...
@@ -1160,14 +1169,6 @@ VOID __cdecl CRTDLL_delete(VOID* ptr)
}
/*********************************************************************
* _strdup (CRTDLL.285)
*/
LPSTR
__cdecl
CRTDLL__strdup
(
LPCSTR
ptr
)
{
return
HEAP_strdupA
(
GetProcessHeap
(),
0
,
ptr
);
}
/*********************************************************************
* fclose (CRTDLL.362)
*/
INT
__cdecl
CRTDLL_fclose
(
CRTDLL_FILE
*
file
)
...
...
@@ -1659,7 +1660,27 @@ LPINT __cdecl CRTDLL__errno()
static
int
crtdllerrno
;
/* FIXME: we should set the error at the failing function call time */
crtdllerrno
=
LastErrorToErrno
(
GetLastError
());
switch
(
GetLastError
())
{
case
ERROR_ACCESS_DENIED
:
crtdllerrno
=
EPERM
;
break
;
case
ERROR_FILE_NOT_FOUND
:
crtdllerrno
=
ENOENT
;
break
;
case
ERROR_INVALID_PARAMETER
:
crtdllerrno
=
EINVAL
;
break
;
case
ERROR_IO_DEVICE
:
crtdllerrno
=
EIO
;
break
;
case
ERROR_BAD_FORMAT
:
crtdllerrno
=
ENOEXEC
;
break
;
case
ERROR_INVALID_HANDLE
:
crtdllerrno
=
EBADF
;
break
;
case
ERROR_OUTOFMEMORY
:
crtdllerrno
=
ENOMEM
;
break
;
case
ERROR_BUSY
:
crtdllerrno
=
EBUSY
;
break
;
case
ERROR_FILE_EXISTS
:
crtdllerrno
=
EEXIST
;
break
;
case
ERROR_BAD_DEVICE
:
crtdllerrno
=
ENODEV
;
break
;
case
ERROR_TOO_MANY_OPEN_FILES
:
crtdllerrno
=
EMFILE
;
break
;
case
ERROR_DISK_FULL
:
crtdllerrno
=
ENOSPC
;
break
;
case
ERROR_SEEK_ON_DEVICE
:
crtdllerrno
=
ESPIPE
;
break
;
case
ERROR_BROKEN_PIPE
:
crtdllerrno
=
EPIPE
;
break
;
case
ERROR_POSSIBLE_DEADLOCK
:
crtdllerrno
=
EDEADLK
;
break
;
case
ERROR_FILENAME_EXCED_RANGE
:
crtdllerrno
=
ENAMETOOLONG
;
break
;
case
ERROR_DIR_NOT_EMPTY
:
crtdllerrno
=
ENOTEMPTY
;
break
;
}
return
&
crtdllerrno
;
}
...
...
dlls/crtdll/wcstring.c
View file @
e101f6db
...
...
@@ -11,6 +11,7 @@
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wine/unicode.h"
#include "crtdll.h"
...
...
@@ -114,7 +115,7 @@ LPWSTR __cdecl CRTDLL_wcspbrk( LPCWSTR str, LPCWSTR accept )
*/
INT
__cdecl
CRTDLL_wctomb
(
LPSTR
dst
,
WCHAR
ch
)
{
return
WideCharToMultiByte
(
CP_ACP
,
0
,
ch
,
1
,
dst
,
6
,
NULL
,
NULL
);
return
WideCharToMultiByte
(
CP_ACP
,
0
,
&
ch
,
1
,
dst
,
6
,
NULL
,
NULL
);
}
/*********************************************************************
...
...
dlls/imm32/Makefile.in
View file @
e101f6db
...
...
@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
imm32
SOVERSION
=
1.0
IMPORTS
=
kernel32
C_SRCS
=
\
imm.c
...
...
dlls/imm32/imm32.spec
View file @
e101f6db
name imm32
type win32
import kernel32.dll
@ stdcall ImmAssociateContext(long long) ImmAssociateContext
@ stdcall ImmConfigureIMEA(long long long ptr) ImmConfigureIMEA
@ stdcall ImmConfigureIMEW(long long long ptr) ImmConfigureIMEW
...
...
dlls/kernel/wowthunk.c
View file @
e101f6db
...
...
@@ -7,15 +7,15 @@
#include "wine/winbase16.h"
#include "winbase.h"
#include "wownt32.h"
#include "file.h"
#include "heap.h"
#include "miscemu.h"
#include "syslevel.h"
#include "stackframe.h"
#include "builtin16.h"
#include "debugtools.h"
#include "file.h"
DEFAULT_DEBUG_CHANNEL
(
thunk
)
DEFAULT_DEBUG_CHANNEL
(
thunk
)
;
/*
* 32-bit WOW routines (in WOW32, but actually forwarded to KERNEL32)
...
...
dlls/ole32/compobj.c
View file @
e101f6db
...
...
@@ -21,7 +21,6 @@
#include "wownt32.h"
#include "ole2ver.h"
#include "debugtools.h"
#include "file.h"
#include "heap.h"
#include "ldt.h"
#include "winreg.h"
...
...
@@ -1492,11 +1491,10 @@ void WINAPI CoFreeUnusedLibraries(void)
* RETURNS
* the current system time in lpFileTime
*/
HRESULT
WINAPI
CoFileTimeNow
(
FILETIME
*
lpFileTime
/* [out] the current time */
)
{
DOSFS_UnixTimeToFileTime
(
time
(
NULL
),
lpFileTime
,
0
);
return
S_OK
;
HRESULT
WINAPI
CoFileTimeNow
(
FILETIME
*
lpFileTime
)
/* [out] the current time */
{
GetSystemTimeAsFileTime
(
lpFileTime
);
return
S_OK
;
}
/***********************************************************************
...
...
dlls/opengl32/Makefile.in
View file @
e101f6db
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
opengl32
SOVERSION
=
1.0
IMPORTS
=
x11drv
IMPORTS
=
x11drv
kernel32
C_SRCS
=
\
wgl.c
\
...
...
dlls/opengl32/opengl32.spec
View file @
e101f6db
name opengl32
type win32
init OpenGL32_Init
import x11drv
import kernel32
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
...
...
dlls/setupapi/Makefile.in
View file @
e101f6db
...
...
@@ -5,7 +5,7 @@ VPATH = @srcdir@
MODULE
=
setupapi
SOVERSION
=
1.0
ALTNAMES
=
setupx
IMPORTS
=
kernel32
IMPORTS
=
advapi32
kernel32
C_SRCS
=
\
setupx_main.c
\
...
...
dlls/setupapi/setupapi.spec
View file @
e101f6db
name setupapi
type win32
import advapi32.dll
import kernel32.dll
# almost all functions are commented out for now. Ordinals are from setupapi.dll 4.0
...
...
dlls/shlwapi/Makefile.in
View file @
e101f6db
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
shlwapi
SOVERSION
=
1.0
IMPORTS
=
advapi32 user32 kernel32
IMPORTS
=
advapi32 user32
gdi32
kernel32
C_SRCS
=
\
ordinal.c
\
...
...
dlls/shlwapi/shlwapi.spec
View file @
e101f6db
...
...
@@ -4,6 +4,7 @@ init SHLWAPI_LibMain
import advapi32
import user32
import gdi32
import kernel32
1 stdcall @(ptr ptr) SHLWAPI_1
...
...
@@ -614,7 +615,7 @@ import kernel32
@ stdcall StrCSpnW (wstr wstr) StrCSpnW
@ stdcall StrCatBuffA (str str long) StrCatBuffA
@ stdcall StrCatBuffW (wstr wstr long) StrCatBuffW
@ st
ub
StrCatW
@ st
dcall StrCatW (ptr wstr)
StrCatW
@ stdcall StrChrA (str long) StrChrA
@ stub StrChrIA
@ stub StrChrIW
...
...
@@ -626,7 +627,7 @@ import kernel32
@ stdcall StrCmpNW (wstr wstr long) StrCmpNW
@ stdcall StrCmpW (wstr wstr) lstrcmpW
@ stdcall StrCpyNW (ptr wstr long) lstrcpynW
@ stdcall StrCpyW (ptr wstr)
lstrc
pyW
@ stdcall StrCpyW (ptr wstr)
StrC
pyW
@ stdcall StrDupA (str) StrDupA
@ stdcall StrDupW (wstr) StrDupW
@ stdcall StrFormatByteSizeA(long str long) StrFormatByteSizeA
...
...
dlls/shlwapi/string.c
View file @
e101f6db
...
...
@@ -67,6 +67,24 @@ int WINAPI StrCmpNIW ( LPCWSTR wstr1, LPCWSTR wstr2, int len)
}
/*************************************************************************
* StrCatW [SHLWAPI]
*/
LPWSTR
WINAPI
StrCatW
(
LPWSTR
wstr1
,
LPCWSTR
wstr2
)
{
return
strcatW
(
wstr1
,
wstr2
);
}
/*************************************************************************
* StrCpyW [SHLWAPI]
*/
LPWSTR
WINAPI
StrCpyW
(
LPWSTR
wstr1
,
LPCWSTR
wstr2
)
{
return
strcpyW
(
wstr1
,
wstr2
);
}
/*************************************************************************
* StrStrA [SHLWAPI]
*/
LPSTR
WINAPI
StrStrA
(
LPCSTR
lpFirst
,
LPCSTR
lpSrch
)
...
...
@@ -174,7 +192,7 @@ LPWSTR WINAPI StrDupW (LPCWSTR lpSrc)
TRACE
(
"%s
\n
"
,
debugstr_w
(
lpSrc
));
if
(
lpDest
)
l
strcpyW
(
lpDest
,
lpSrc
);
if
(
lpDest
)
strcpyW
(
lpDest
,
lpSrc
);
return
lpDest
;
}
...
...
files/dos_fs.c
View file @
e101f6db
...
...
@@ -25,6 +25,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "wine/winbase16.h"
#include "wine/unicode.h"
#include "winerror.h"
#include "drive.h"
#include "file.h"
...
...
@@ -966,7 +967,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
/* Check if the file exists and use the existing file name */
if
(
DOSFS_GetFullName
(
tmpshortpath
,
TRUE
,
&
full_name
)
)
{
lstrcpyA
(
tmpshortpath
+
sp
,
strrchr
(
full_name
.
short_name
,
'\\'
)
+
1
);
strcpy
(
tmpshortpath
+
sp
,
strrchr
(
full_name
.
short_name
,
'\\'
)
+
1
);
sp
+=
strlen
(
tmpshortpath
+
sp
);
lp
+=
tmplen
;
continue
;
...
...
@@ -1266,7 +1267,7 @@ DWORD WINAPI GetFullPathNameW( LPCWSTR name, DWORD len, LPWSTR buffer,
HeapFree
(
GetProcessHeap
(),
0
,
nameA
);
if
(
ret
&&
(
ret
<=
len
)
&&
buffer
&&
lastpart
)
{
LPWSTR
p
=
buffer
+
l
strlenW
(
buffer
);
LPWSTR
p
=
buffer
+
strlenW
(
buffer
);
if
(
*
p
!=
(
WCHAR
)
'\\'
)
{
while
((
p
>
buffer
+
2
)
&&
(
*
p
!=
(
WCHAR
)
'\\'
))
p
--
;
...
...
@@ -1295,9 +1296,9 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry )
{
if
(
info
->
cur_pos
)
return
0
;
entry
->
dwFileAttributes
=
FILE_ATTRIBUTE_LABEL
;
DOSFS_UnixTimeToFileTime
(
(
time_t
)
0
,
&
entry
->
ftCreationTime
,
0
);
DOSFS_UnixTimeToFileTime
(
(
time_t
)
0
,
&
entry
->
ftLastAccessTime
,
0
);
DOSFS_UnixTimeToFileTime
(
(
time_t
)
0
,
&
entry
->
ftLastWriteTime
,
0
);
RtlSecondsSince1970ToTime
(
(
time_t
)
0
,
&
entry
->
ftCreationTime
);
RtlSecondsSince1970ToTime
(
(
time_t
)
0
,
&
entry
->
ftLastAccessTime
);
RtlSecondsSince1970ToTime
(
(
time_t
)
0
,
&
entry
->
ftLastWriteTime
);
entry
->
nFileSizeHigh
=
0
;
entry
->
nFileSizeLow
=
0
;
entry
->
dwReserved0
=
0
;
...
...
@@ -1932,7 +1933,7 @@ BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft)
newtm
.
tm_mday
=
(
fatdate
&
0x1f
);
newtm
.
tm_mon
=
((
fatdate
>>
5
)
&
0x0f
)
-
1
;
newtm
.
tm_year
=
(
fatdate
>>
9
)
+
80
;
DOSFS_UnixTimeToFileTime
(
mktime
(
&
newtm
),
ft
,
0
);
RtlSecondsSince1970ToTime
(
mktime
(
&
newtm
),
ft
);
return
TRUE
;
}
...
...
files/file.c
View file @
e101f6db
...
...
@@ -526,9 +526,9 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
if
(
!
(
st
->
st_mode
&
S_IWUSR
))
info
->
dwFileAttributes
|=
FILE_ATTRIBUTE_READONLY
;
DOSFS_UnixTimeToFileTime
(
st
->
st_mtime
,
&
info
->
ftCreationTime
,
0
);
DOSFS_UnixTimeToFileTime
(
st
->
st_mtime
,
&
info
->
ftLastWriteTime
,
0
);
DOSFS_UnixTimeToFileTime
(
st
->
st_atime
,
&
info
->
ftLastAccessTime
,
0
);
RtlSecondsSince1970ToTime
(
st
->
st_mtime
,
&
info
->
ftCreationTime
);
RtlSecondsSince1970ToTime
(
st
->
st_mtime
,
&
info
->
ftLastWriteTime
);
RtlSecondsSince1970ToTime
(
st
->
st_atime
,
&
info
->
ftLastAccessTime
);
info
->
dwVolumeSerialNumber
=
0
;
/* FIXME */
info
->
nFileSizeHigh
=
0
;
...
...
@@ -571,9 +571,9 @@ DWORD WINAPI GetFileInformationByHandle( HANDLE hFile,
if
(
!
info
)
return
0
;
req
->
handle
=
hFile
;
if
(
server_call
(
REQ_GET_FILE_INFO
))
return
0
;
DOSFS_UnixTimeToFileTime
(
req
->
write_time
,
&
info
->
ftCreationTime
,
0
);
DOSFS_UnixTimeToFileTime
(
req
->
write_time
,
&
info
->
ftLastWriteTime
,
0
);
DOSFS_UnixTimeToFileTime
(
req
->
access_time
,
&
info
->
ftLastAccessTime
,
0
);
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftCreationTime
);
RtlSecondsSince1970ToTime
(
req
->
write_time
,
&
info
->
ftLastWriteTime
);
RtlSecondsSince1970ToTime
(
req
->
access_time
,
&
info
->
ftLastAccessTime
);
info
->
dwFileAttributes
=
req
->
attr
;
info
->
dwVolumeSerialNumber
=
req
->
serial
;
info
->
nFileSizeHigh
=
req
->
size_high
;
...
...
win32/Makefile.in
View file @
e101f6db
...
...
@@ -8,7 +8,6 @@ MODULE = win32
C_SRCS
=
\
console.c
\
device.c
\
error.c
\
except.c
\
file.c
\
init.c
\
...
...
win32/error.c
deleted
100644 → 0
View file @
c7e7df8b
/*
* Win32 kernel functions
*
* Copyright 1995 Martin von Loewis and Cameron Heide
*/
#include <errno.h>
#include "windef.h"
#include "winerror.h"
/* The errno_xlat_table contains the errno-to-Win32 error
* mapping. Since this is a single table, it can't easily
* take into account function-specific differences, so there
* will probably be quite a few points where we don't exactly
* match what NT would return. Then again, neither does
* Windows 95. :-)
*/
typedef
struct
{
int
err
;
DWORD
win32err
;
}
ERRNO_XLAT_TABLE
;
/* The table looks pretty ugly due to the preprocessor stuff,
* but I honestly have no idea how many of these values are
* portable. I'm not even sure how many of them are even
* used at all. :-)
*/
static
ERRNO_XLAT_TABLE
errno_xlat_table
[]
=
{
#if defined(EPERM)
{
EPERM
,
ERROR_ACCESS_DENIED
},
#endif
#if defined(ENOENT)
{
ENOENT
,
ERROR_FILE_NOT_FOUND
},
#endif
#if defined(ESRCH)
{
ESRCH
,
ERROR_INVALID_PARAMETER
},
#endif
#if defined(EIO)
{
EIO
,
ERROR_IO_DEVICE
},
#endif
#if defined(ENOEXEC)
{
ENOEXEC
,
ERROR_BAD_FORMAT
},
#endif
#if defined(EBADF)
{
EBADF
,
ERROR_INVALID_HANDLE
},
#endif
#if defined(ENOMEM)
{
ENOMEM
,
ERROR_OUTOFMEMORY
},
#endif
#if defined(EACCES)
{
EACCES
,
ERROR_ACCESS_DENIED
},
#endif
#if defined(EBUSY)
{
EBUSY
,
ERROR_BUSY
},
#endif
#if defined(EEXIST)
{
EEXIST
,
ERROR_FILE_EXISTS
},
#endif
#if defined(ENODEV)
{
ENODEV
,
ERROR_BAD_DEVICE
},
#endif
#if defined(EINVAL)
{
EINVAL
,
ERROR_INVALID_PARAMETER
},
#endif
#if defined(EMFILE)
{
EMFILE
,
ERROR_TOO_MANY_OPEN_FILES
},
#endif
#if defined(ETXTBSY)
{
ETXTBSY
,
ERROR_BUSY
,
},
#endif
#if defined(ENOSPC)
{
ENOSPC
,
ERROR_DISK_FULL
},
#endif
#if defined(ESPIPE)
{
ESPIPE
,
ERROR_SEEK_ON_DEVICE
},
#endif
#if defined(EPIPE)
{
EPIPE
,
ERROR_BROKEN_PIPE
},
#endif
#if defined(EDEADLK)
{
EDEADLK
,
ERROR_POSSIBLE_DEADLOCK
},
#endif
#if defined(ENAMETOOLONG)
{
ENAMETOOLONG
,
ERROR_FILENAME_EXCED_RANGE
},
#endif
#if defined(ENOTEMPTY)
{
ENOTEMPTY
,
ERROR_DIR_NOT_EMPTY
},
#endif
{
-
1
,
0
}
};
DWORD
ErrnoToLastError
(
int
errno_num
)
{
DWORD
rc
=
ERROR_UNKNOWN
;
int
i
=
0
;
while
(
errno_xlat_table
[
i
].
err
!=
-
1
)
{
if
(
errno_xlat_table
[
i
].
err
==
errno_num
)
{
rc
=
errno_xlat_table
[
i
].
win32err
;
break
;
}
i
++
;
}
return
rc
;
}
int
LastErrorToErrno
(
DWORD
lasterror
)
{
int
rc
=
0
;
/* no error */
int
i
=
0
;
while
(
errno_xlat_table
[
i
].
err
!=
-
1
)
{
if
(
errno_xlat_table
[
i
].
win32err
==
lasterror
)
{
rc
=
errno_xlat_table
[
i
].
err
;
break
;
}
i
++
;
}
return
rc
;
}
win32/file.c
View file @
e101f6db
...
...
@@ -27,9 +27,7 @@
#include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
file
)
DWORD
ErrnoToLastError
(
int
errno_num
);
DEFAULT_DEBUG_CHANNEL
(
file
);
/***********************************************************************
* ReadFileEx (KERNEL32.)
...
...
@@ -74,7 +72,7 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
}
if
(
stat
(
full_name
.
long_name
,
&
buf
)
==-
1
)
{
SetLastError
(
ErrnoToLastError
(
errno
)
);
FILE_SetDosError
(
);
return
FALSE
;
}
if
(
attributes
&
FILE_ATTRIBUTE_READONLY
)
...
...
@@ -100,8 +98,8 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
lpFileName
,
attributes
);
if
(
-
1
==
chmod
(
full_name
.
long_name
,
buf
.
st_mode
))
{
FILE_SetDosError
();
MESSAGE
(
"Wine ERROR: Couldn't set file attributes for existing file
\"
%s
\"
. Check permissions !
\n
"
,
full_name
.
long_name
);
SetLastError
(
ErrnoToLastError
(
errno
));
return
FALSE
;
}
return
TRUE
;
...
...
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