Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
9b802a3d
Commit
9b802a3d
authored
Feb 08, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
df25a192
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
95 additions
and
89 deletions
+95
-89
Makefile.in
dlls/concrt140/Makefile.in
+0
-1
Makefile.in
dlls/crtdll/Makefile.in
+1
-1
Makefile.in
dlls/msvcr100/Makefile.in
+1
-1
Makefile.in
dlls/msvcr110/Makefile.in
+1
-1
Makefile.in
dlls/msvcr120/Makefile.in
+1
-1
Makefile.in
dlls/msvcr70/Makefile.in
+1
-1
Makefile.in
dlls/msvcr71/Makefile.in
+1
-1
Makefile.in
dlls/msvcr80/Makefile.in
+1
-1
Makefile.in
dlls/msvcr90/Makefile.in
+1
-1
Makefile.in
dlls/msvcrt/Makefile.in
+1
-1
concurrency.c
dlls/msvcrt/concurrency.c
+2
-2
console.c
dlls/msvcrt/console.c
+1
-1
except.c
dlls/msvcrt/except.c
+1
-1
except_i386.c
dlls/msvcrt/except_i386.c
+9
-9
except_x86_64.c
dlls/msvcrt/except_x86_64.c
+6
-6
file.c
dlls/msvcrt/file.c
+43
-42
locale.c
dlls/msvcrt/locale.c
+7
-7
main.c
dlls/msvcrt/main.c
+1
-1
math.c
dlls/msvcrt/math.c
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+8
-2
misc.c
dlls/msvcrt/misc.c
+3
-3
thread.c
dlls/msvcrt/thread.c
+2
-2
Makefile.in
dlls/msvcrtd/Makefile.in
+1
-1
Makefile.in
dlls/ucrtbase/Makefile.in
+1
-1
No files found.
dlls/concrt140/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
concrt140.dll
MODULE
=
concrt140.dll
PARENTSRC
=
../msvcrt
PARENTSRC
=
../msvcrt
...
...
dlls/crtdll/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTDLL
-D_CRTIMP
=
EXTRADEFS
=
-D_CRTDLL
-D_CRTIMP
=
MODULE
=
crtdll.dll
MODULE
=
crtdll.dll
IMPORTS
=
ntdll
IMPORTS
=
ntdll
DELAYIMPORTS
=
advapi32 user32
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr100/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr100.dll
MODULE
=
msvcr100.dll
IMPORTLIB
=
msvcr100
IMPORTLIB
=
msvcr100
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr110/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr110.dll
MODULE
=
msvcr110.dll
IMPORTLIB
=
msvcr110
IMPORTLIB
=
msvcr110
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr120/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr120.dll
MODULE
=
msvcr120.dll
IMPORTLIB
=
msvcr120
IMPORTLIB
=
msvcr120
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr70/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr70.dll
MODULE
=
msvcr70.dll
IMPORTLIB
=
msvcr70
IMPORTLIB
=
msvcr70
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr71/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr71.dll
MODULE
=
msvcr71.dll
IMPORTLIB
=
msvcr71
IMPORTLIB
=
msvcr71
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr80/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr80.dll
MODULE
=
msvcr80.dll
IMPORTLIB
=
msvcr80
IMPORTLIB
=
msvcr80
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcr90/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcr90.dll
MODULE
=
msvcr90.dll
IMPORTLIB
=
msvcr90
IMPORTLIB
=
msvcr90
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcrt/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcrt.dll
MODULE
=
msvcrt.dll
IMPORTLIB
=
msvcrt
IMPORTLIB
=
msvcrt
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/msvcrt/concurrency.c
View file @
9b802a3d
...
@@ -527,7 +527,7 @@ DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_ctor_name, 12)
...
@@ -527,7 +527,7 @@ DEFINE_THISCALL_WRAPPER(scheduler_resource_allocation_error_ctor_name, 12)
scheduler_resource_allocation_error
*
__thiscall
scheduler_resource_allocation_error_ctor_name
(
scheduler_resource_allocation_error
*
__thiscall
scheduler_resource_allocation_error_ctor_name
(
scheduler_resource_allocation_error
*
this
,
const
char
*
name
,
HRESULT
hr
)
scheduler_resource_allocation_error
*
this
,
const
char
*
name
,
HRESULT
hr
)
{
{
TRACE
(
"(%p %s %x)
\n
"
,
this
,
wine_dbgstr_a
(
name
),
hr
);
TRACE
(
"(%p %s %
l
x)
\n
"
,
this
,
wine_dbgstr_a
(
name
),
hr
);
__exception_ctor
(
&
this
->
e
,
name
,
&
scheduler_resource_allocation_error_vtable
);
__exception_ctor
(
&
this
->
e
,
name
,
&
scheduler_resource_allocation_error_vtable
);
this
->
hr
=
hr
;
this
->
hr
=
hr
;
return
this
;
return
this
;
...
@@ -1101,7 +1101,7 @@ static void ThreadScheduler_dtor(ThreadScheduler *this)
...
@@ -1101,7 +1101,7 @@ static void ThreadScheduler_dtor(ThreadScheduler *this)
{
{
int
i
;
int
i
;
if
(
this
->
ref
!=
0
)
WARN
(
"ref = %d
\n
"
,
this
->
ref
);
if
(
this
->
ref
!=
0
)
WARN
(
"ref = %
l
d
\n
"
,
this
->
ref
);
SchedulerPolicy_dtor
(
&
this
->
policy
);
SchedulerPolicy_dtor
(
&
this
->
policy
);
for
(
i
=
0
;
i
<
this
->
shutdown_count
;
i
++
)
for
(
i
=
0
;
i
<
this
->
shutdown_count
;
i
++
)
...
...
dlls/msvcrt/console.c
View file @
9b802a3d
...
@@ -153,7 +153,7 @@ static BOOL handle_enhanced_keys(INPUT_RECORD *ir, unsigned char *ch1, unsigned
...
@@ -153,7 +153,7 @@ static BOOL handle_enhanced_keys(INPUT_RECORD *ir, unsigned char *ch1, unsigned
}
}
}
}
WARN
(
"Unmapped char keyState=%x vk=%x
\n
"
,
WARN
(
"Unmapped char keyState=%
l
x vk=%x
\n
"
,
ir
->
Event
.
KeyEvent
.
dwControlKeyState
,
ir
->
Event
.
KeyEvent
.
wVirtualScanCode
);
ir
->
Event
.
KeyEvent
.
dwControlKeyState
,
ir
->
Event
.
KeyEvent
.
wVirtualScanCode
);
return
FALSE
;
return
FALSE
;
}
}
...
...
dlls/msvcrt/except.c
View file @
9b802a3d
...
@@ -272,7 +272,7 @@ int CDECL raise(int sig)
...
@@ -272,7 +272,7 @@ int CDECL raise(int sig)
*/
*/
int
CDECL
_XcptFilter
(
NTSTATUS
ex
,
PEXCEPTION_POINTERS
ptr
)
int
CDECL
_XcptFilter
(
NTSTATUS
ex
,
PEXCEPTION_POINTERS
ptr
)
{
{
TRACE
(
"(%08x,%p)
\n
"
,
ex
,
ptr
);
TRACE
(
"(%08
l
x,%p)
\n
"
,
ex
,
ptr
);
/* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
/* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
return
msvcrt_exception_filter
(
ptr
);
return
msvcrt_exception_filter
(
ptr
);
}
}
...
...
dlls/msvcrt/except_i386.c
View file @
9b802a3d
...
@@ -368,7 +368,7 @@ static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REG
...
@@ -368,7 +368,7 @@ static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REG
*
rec
=
*
prev_rec
;
*
rec
=
*
prev_rec
;
rec
->
ExceptionFlags
&=
~
EH_UNWINDING
;
rec
->
ExceptionFlags
&=
~
EH_UNWINDING
;
if
(
TRACE_ON
(
seh
))
{
if
(
TRACE_ON
(
seh
))
{
TRACE
(
"detect rethrow: exception code: %x
\n
"
,
rec
->
ExceptionCode
);
TRACE
(
"detect rethrow: exception code: %
l
x
\n
"
,
rec
->
ExceptionCode
);
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
)
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
)
TRACE
(
"re-propagate: obj: %lx, type: %lx
\n
"
,
TRACE
(
"re-propagate: obj: %lx, type: %lx
\n
"
,
rec
->
ExceptionInformation
[
1
],
rec
->
ExceptionInformation
[
2
]);
rec
->
ExceptionInformation
[
1
],
rec
->
ExceptionInformation
[
2
]);
...
@@ -538,7 +538,7 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c )
...
@@ -538,7 +538,7 @@ static LONG CALLBACK se_translation_filter( EXCEPTION_POINTERS *ep, void *c )
if
(
rec
->
ExceptionCode
!=
CXX_EXCEPTION
)
if
(
rec
->
ExceptionCode
!=
CXX_EXCEPTION
)
{
{
TRACE
(
"non-c++ exception thrown in SEH handler: %x
\n
"
,
rec
->
ExceptionCode
);
TRACE
(
"non-c++ exception thrown in SEH handler: %
l
x
\n
"
,
rec
->
ExceptionCode
);
terminate
();
terminate
();
}
}
...
@@ -601,7 +601,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
...
@@ -601,7 +601,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
*
rec
=
*
msvcrt_get_thread_data
()
->
exc_record
;
*
rec
=
*
msvcrt_get_thread_data
()
->
exc_record
;
rec
->
ExceptionFlags
&=
~
EH_UNWINDING
;
rec
->
ExceptionFlags
&=
~
EH_UNWINDING
;
if
(
TRACE_ON
(
seh
))
{
if
(
TRACE_ON
(
seh
))
{
TRACE
(
"detect rethrow: exception code: %x
\n
"
,
rec
->
ExceptionCode
);
TRACE
(
"detect rethrow: exception code: %
l
x
\n
"
,
rec
->
ExceptionCode
);
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
)
if
(
rec
->
ExceptionCode
==
CXX_EXCEPTION
)
TRACE
(
"re-propagate: obj: %lx, type: %lx
\n
"
,
TRACE
(
"re-propagate: obj: %lx, type: %lx
\n
"
,
rec
->
ExceptionInformation
[
1
],
rec
->
ExceptionInformation
[
2
]);
rec
->
ExceptionInformation
[
1
],
rec
->
ExceptionInformation
[
2
]);
...
@@ -633,7 +633,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
...
@@ -633,7 +633,7 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
thread_data_t
*
data
=
msvcrt_get_thread_data
();
thread_data_t
*
data
=
msvcrt_get_thread_data
();
exc_type
=
NULL
;
exc_type
=
NULL
;
TRACE
(
"handling C exception code %x rec %p frame %p trylevel %d descr %p nested_frame %p
\n
"
,
TRACE
(
"handling C exception code %
l
x rec %p frame %p trylevel %d descr %p nested_frame %p
\n
"
,
rec
->
ExceptionCode
,
rec
,
frame
,
frame
->
trylevel
,
descr
,
nested_frame
);
rec
->
ExceptionCode
,
rec
,
frame
,
frame
->
trylevel
,
descr
,
nested_frame
);
if
(
data
->
se_translator
)
{
if
(
data
->
se_translator
)
{
...
@@ -866,7 +866,7 @@ int CDECL _except_handler2(PEXCEPTION_RECORD rec,
...
@@ -866,7 +866,7 @@ int CDECL _except_handler2(PEXCEPTION_RECORD rec,
PCONTEXT
context
,
PCONTEXT
context
,
EXCEPTION_REGISTRATION_RECORD
**
dispatcher
)
EXCEPTION_REGISTRATION_RECORD
**
dispatcher
)
{
{
FIXME
(
"exception %
x flags=%
x at %p handler=%p %p %p stub
\n
"
,
FIXME
(
"exception %
lx flags=%l
x at %p handler=%p %p %p stub
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
frame
->
Handler
,
context
,
dispatcher
);
frame
->
Handler
,
context
,
dispatcher
);
return
ExceptionContinueSearch
;
return
ExceptionContinueSearch
;
...
@@ -883,7 +883,7 @@ int CDECL _except_handler3(PEXCEPTION_RECORD rec,
...
@@ -883,7 +883,7 @@ int CDECL _except_handler3(PEXCEPTION_RECORD rec,
EXCEPTION_POINTERS
exceptPtrs
;
EXCEPTION_POINTERS
exceptPtrs
;
PSCOPETABLE
pScopeTable
;
PSCOPETABLE
pScopeTable
;
TRACE
(
"exception %
x flags=%
x at %p handler=%p %p %p semi-stub
\n
"
,
TRACE
(
"exception %
lx flags=%l
x at %p handler=%p %p %p semi-stub
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
frame
->
handler
,
context
,
dispatcher
);
frame
->
handler
,
context
,
dispatcher
);
...
@@ -952,7 +952,7 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void),
...
@@ -952,7 +952,7 @@ int CDECL _except_handler4_common( ULONG *cookie, void (*check_cookie)(void),
EXCEPTION_POINTERS
exceptPtrs
;
EXCEPTION_POINTERS
exceptPtrs
;
const
SCOPETABLE_V4
*
scope_table
=
get_scopetable_v4
(
frame
,
*
cookie
);
const
SCOPETABLE_V4
*
scope_table
=
get_scopetable_v4
(
frame
,
*
cookie
);
TRACE
(
"exception %
x flags=%x at %p handler=%p %p %p cookie=%x scope table=%p cookies=%d/%x,%d/%
x
\n
"
,
TRACE
(
"exception %
lx flags=%lx at %p handler=%p %p %p cookie=%lx scope table=%p cookies=%d/%lx,%d/%l
x
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
frame
->
handler
,
context
,
dispatcher
,
*
cookie
,
scope_table
,
frame
->
handler
,
context
,
dispatcher
,
*
cookie
,
scope_table
,
scope_table
->
gs_cookie_offset
,
scope_table
->
gs_cookie_xor
,
scope_table
->
gs_cookie_offset
,
scope_table
->
gs_cookie_xor
,
...
@@ -1187,7 +1187,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
...
@@ -1187,7 +1187,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
rec
.
Cause
.
Underflow
=
rec
.
Enable
.
Underflow
&
rec
.
Status
.
Underflow
;
rec
.
Cause
.
Underflow
=
rec
.
Enable
.
Underflow
&
rec
.
Status
.
Underflow
;
rec
.
Cause
.
Inexact
=
rec
.
Enable
.
Inexact
&
rec
.
Status
.
Inexact
;
rec
.
Cause
.
Inexact
=
rec
.
Enable
.
Inexact
&
rec
.
Status
.
Inexact
;
TRACE
(
"opcode: %x
\n
"
,
*
(
ULONG
*
)
ep
->
ContextRecord
->
FloatSave
.
ErrorOffset
);
TRACE
(
"opcode: %
l
x
\n
"
,
*
(
ULONG
*
)
ep
->
ContextRecord
->
FloatSave
.
ErrorOffset
);
if
(
*
(
WORD
*
)
ctx
->
ErrorOffset
==
0x35dc
)
{
/* fdiv m64fp */
if
(
*
(
WORD
*
)
ctx
->
ErrorOffset
==
0x35dc
)
{
/* fdiv m64fp */
if
(
exception_code
==
STATUS_FLOAT_DIVIDE_BY_ZERO
||
exception_code
==
STATUS_FLOAT_INVALID_OPERATION
)
{
if
(
exception_code
==
STATUS_FLOAT_DIVIDE_BY_ZERO
||
exception_code
==
STATUS_FLOAT_INVALID_OPERATION
)
{
...
@@ -1213,7 +1213,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
...
@@ -1213,7 +1213,7 @@ int __cdecl _fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep,
return
ret
;
return
ret
;
}
}
FIXME
(
"unsupported opcode: %x
\n
"
,
*
(
ULONG
*
)
ep
->
ContextRecord
->
FloatSave
.
ErrorOffset
);
FIXME
(
"unsupported opcode: %
l
x
\n
"
,
*
(
ULONG
*
)
ep
->
ContextRecord
->
FloatSave
.
ErrorOffset
);
return
EXCEPTION_CONTINUE_SEARCH
;
return
EXCEPTION_CONTINUE_SEARCH
;
}
}
...
...
dlls/msvcrt/except_x86_64.c
View file @
9b802a3d
...
@@ -350,7 +350,7 @@ static void* WINAPI call_catch_block(EXCEPTION_RECORD *rec)
...
@@ -350,7 +350,7 @@ static void* WINAPI call_catch_block(EXCEPTION_RECORD *rec)
}
}
__EXCEPT_CTX
(
cxx_rethrow_filter
,
&
ctx
)
__EXCEPT_CTX
(
cxx_rethrow_filter
,
&
ctx
)
{
{
TRACE
(
"detect rethrow: exception code: %x
\n
"
,
prev_rec
->
ExceptionCode
);
TRACE
(
"detect rethrow: exception code: %
l
x
\n
"
,
prev_rec
->
ExceptionCode
);
ctx
.
rethrow
=
TRUE
;
ctx
.
rethrow
=
TRUE
;
if
(
untrans_rec
)
if
(
untrans_rec
)
...
@@ -486,7 +486,7 @@ static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c)
...
@@ -486,7 +486,7 @@ static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c)
if
(
rec
->
ExceptionCode
!=
CXX_EXCEPTION
)
if
(
rec
->
ExceptionCode
!=
CXX_EXCEPTION
)
{
{
TRACE
(
"non-c++ exception thrown in SEH handler: %x
\n
"
,
rec
->
ExceptionCode
);
TRACE
(
"non-c++ exception thrown in SEH handler: %
l
x
\n
"
,
rec
->
ExceptionCode
);
terminate
();
terminate
();
}
}
...
@@ -558,7 +558,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
...
@@ -558,7 +558,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
TRACE
(
"nested exception detected
\n
"
);
TRACE
(
"nested exception detected
\n
"
);
unwindlevel
=
tryblock
->
end_level
;
unwindlevel
=
tryblock
->
end_level
;
orig_frame
=
*
(
ULONG64
*
)
rva_to_ptr
(
catchblock
->
frame
,
frame
);
orig_frame
=
*
(
ULONG64
*
)
rva_to_ptr
(
catchblock
->
frame
,
frame
);
TRACE
(
"setting orig_frame to %
l
x
\n
"
,
orig_frame
);
TRACE
(
"setting orig_frame to %
I64
x
\n
"
,
orig_frame
);
}
}
}
}
}
}
...
@@ -591,7 +591,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
...
@@ -591,7 +591,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
if
(
TRACE_ON
(
seh
))
if
(
TRACE_ON
(
seh
))
{
{
TRACE
(
"handling C++ exception rec %p frame %
l
x descr %p
\n
"
,
rec
,
frame
,
descr
);
TRACE
(
"handling C++ exception rec %p frame %
I64
x descr %p
\n
"
,
rec
,
frame
,
descr
);
dump_exception_type
(
exc_type
,
rec
->
ExceptionInformation
[
3
]);
dump_exception_type
(
exc_type
,
rec
->
ExceptionInformation
[
3
]);
dump_function_descr
(
descr
,
dispatch
->
ImageBase
);
dump_function_descr
(
descr
,
dispatch
->
ImageBase
);
}
}
...
@@ -601,7 +601,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
...
@@ -601,7 +601,7 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
thread_data_t
*
data
=
msvcrt_get_thread_data
();
thread_data_t
*
data
=
msvcrt_get_thread_data
();
exc_type
=
NULL
;
exc_type
=
NULL
;
TRACE
(
"handling C exception code %
x rec %p frame %l
x descr %p
\n
"
,
TRACE
(
"handling C exception code %
lx rec %p frame %I64
x descr %p
\n
"
,
rec
->
ExceptionCode
,
rec
,
frame
,
descr
);
rec
->
ExceptionCode
,
rec
,
frame
,
descr
);
if
(
data
->
se_translator
)
{
if
(
data
->
se_translator
)
{
...
@@ -647,7 +647,7 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
...
@@ -647,7 +647,7 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
EXCEPTION_DISPOSITION
CDECL
__CxxFrameHandler
(
EXCEPTION_RECORD
*
rec
,
ULONG64
frame
,
EXCEPTION_DISPOSITION
CDECL
__CxxFrameHandler
(
EXCEPTION_RECORD
*
rec
,
ULONG64
frame
,
CONTEXT
*
context
,
DISPATCHER_CONTEXT
*
dispatch
)
CONTEXT
*
context
,
DISPATCHER_CONTEXT
*
dispatch
)
{
{
TRACE
(
"%p %
l
x %p %p
\n
"
,
rec
,
frame
,
context
,
dispatch
);
TRACE
(
"%p %
I64
x %p %p
\n
"
,
rec
,
frame
,
context
,
dispatch
);
return
cxx_frame_handler
(
rec
,
frame
,
context
,
dispatch
,
return
cxx_frame_handler
(
rec
,
frame
,
context
,
dispatch
,
rva_to_ptr
(
*
(
UINT
*
)
dispatch
->
HandlerData
,
dispatch
->
ImageBase
)
);
rva_to_ptr
(
*
(
UINT
*
)
dispatch
->
HandlerData
,
dispatch
->
ImageBase
)
);
}
}
...
...
dlls/msvcrt/file.c
View file @
9b802a3d
...
@@ -822,7 +822,7 @@ int CDECL _access(const char *filename, int mode)
...
@@ -822,7 +822,7 @@ int CDECL _access(const char *filename, int mode)
{
{
DWORD
attr
=
GetFileAttributesA
(
filename
);
DWORD
attr
=
GetFileAttributesA
(
filename
);
TRACE
(
"(%s,%d) %
d
\n
"
,
filename
,
mode
,
attr
);
TRACE
(
"(%s,%d) %
ld
\n
"
,
filename
,
mode
,
attr
);
if
(
!
filename
||
attr
==
INVALID_FILE_ATTRIBUTES
)
if
(
!
filename
||
attr
==
INVALID_FILE_ATTRIBUTES
)
{
{
...
@@ -857,7 +857,7 @@ int CDECL _waccess(const wchar_t *filename, int mode)
...
@@ -857,7 +857,7 @@ int CDECL _waccess(const wchar_t *filename, int mode)
{
{
DWORD
attr
=
GetFileAttributesW
(
filename
);
DWORD
attr
=
GetFileAttributesW
(
filename
);
TRACE
(
"(%s,%d) %
d
\n
"
,
debugstr_w
(
filename
),
mode
,
attr
);
TRACE
(
"(%s,%d) %
ld
\n
"
,
debugstr_w
(
filename
),
mode
,
attr
);
if
(
!
filename
||
attr
==
INVALID_FILE_ATTRIBUTES
)
if
(
!
filename
||
attr
==
INVALID_FILE_ATTRIBUTES
)
{
{
...
@@ -928,10 +928,10 @@ int CDECL _wchmod(const wchar_t *path, int flags)
...
@@ -928,10 +928,10 @@ int CDECL _wchmod(const wchar_t *path, int flags)
*/
*/
int
CDECL
_unlink
(
const
char
*
path
)
int
CDECL
_unlink
(
const
char
*
path
)
{
{
TRACE
(
"%s
\n
"
,
debugstr_a
(
path
));
TRACE
(
"%s
\n
"
,
debugstr_a
(
path
));
if
(
DeleteFileA
(
path
))
if
(
DeleteFileA
(
path
))
return
0
;
return
0
;
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -941,10 +941,10 @@ int CDECL _unlink(const char *path)
...
@@ -941,10 +941,10 @@ int CDECL _unlink(const char *path)
*/
*/
int
CDECL
_wunlink
(
const
wchar_t
*
path
)
int
CDECL
_wunlink
(
const
wchar_t
*
path
)
{
{
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
path
));
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
path
));
if
(
DeleteFileW
(
path
))
if
(
DeleteFileW
(
path
))
return
0
;
return
0
;
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -972,7 +972,7 @@ int CDECL _commit(int fd)
...
@@ -972,7 +972,7 @@ int CDECL _commit(int fd)
}
}
else
else
{
{
TRACE
(
":failed-last error (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed-last error (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
ret
=
-
1
;
ret
=
-
1
;
}
}
...
@@ -1083,7 +1083,7 @@ int CDECL _close(int fd)
...
@@ -1083,7 +1083,7 @@ int CDECL _close(int fd)
ret
=
CloseHandle
(
info
->
handle
)
?
0
:
-
1
;
ret
=
CloseHandle
(
info
->
handle
)
?
0
:
-
1
;
msvcrt_free_fd
(
fd
);
msvcrt_free_fd
(
fd
);
if
(
ret
)
{
if
(
ret
)
{
WARN
(
":failed-last error (%
d)
\n
"
,
GetLastError
());
WARN
(
":failed-last error (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
}
}
}
}
...
@@ -1309,7 +1309,7 @@ __int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
...
@@ -1309,7 +1309,7 @@ __int64 CDECL _lseeki64(int fd, __int64 offset, int whence)
return
ofs
.
QuadPart
;
return
ofs
.
QuadPart
;
}
}
release_ioinfo
(
info
);
release_ioinfo
(
info
);
TRACE
(
":error-last error (%
d)
\n
"
,
GetLastError
());
TRACE
(
":error-last error (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -1369,18 +1369,18 @@ int CDECL _locking(int fd, int mode, __msvcrt_long nbytes)
...
@@ -1369,18 +1369,18 @@ int CDECL _locking(int fd, int mode, __msvcrt_long nbytes)
return
-
1
;
return
-
1
;
}
}
TRACE
(
":fd (%d) by 0x%
08I
x mode %s
\n
"
,
TRACE
(
":fd (%d) by 0x%
l
x mode %s
\n
"
,
fd
,
nbytes
,(
mode
==
_LK_UNLCK
)
?
"_LK_UNLCK"
:
fd
,
nbytes
,
(
mode
==
_LK_UNLCK
)
?
"_LK_UNLCK"
:
(
mode
==
_LK_LOCK
)
?
"_LK_LOCK"
:
(
mode
==
_LK_LOCK
)
?
"_LK_LOCK"
:
(
mode
==
_LK_NBLCK
)
?
"_LK_NBLCK"
:
(
mode
==
_LK_NBLCK
)
?
"_LK_NBLCK"
:
(
mode
==
_LK_RLCK
)
?
"_LK_RLCK"
:
(
mode
==
_LK_RLCK
)
?
"_LK_RLCK"
:
(
mode
==
_LK_NBRLCK
)
?
"_LK_NBRLCK"
:
(
mode
==
_LK_NBRLCK
)
?
"_LK_NBRLCK"
:
"UNKNOWN"
);
"UNKNOWN"
);
if
((
cur_locn
=
SetFilePointer
(
info
->
handle
,
0L
,
NULL
,
FILE_CURRENT
))
==
INVALID_SET_FILE_POINTER
)
if
((
cur_locn
=
SetFilePointer
(
info
->
handle
,
0L
,
NULL
,
FILE_CURRENT
))
==
INVALID_SET_FILE_POINTER
)
{
{
release_ioinfo
(
info
);
release_ioinfo
(
info
);
FIXME
(
"Seek failed
\n
"
);
FIXME
(
"Seek failed
\n
"
);
*
_errno
()
=
EINVAL
;
/* FIXME */
*
_errno
()
=
EINVAL
;
/* FIXME */
return
-
1
;
return
-
1
;
}
}
...
@@ -1802,7 +1802,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
...
@@ -1802,7 +1802,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
if
((
status
=
NtQueryInformationFile
(
info
->
handle
,
&
io
,
&
basic_info
,
sizeof
(
basic_info
),
FileBasicInformation
))
||
if
((
status
=
NtQueryInformationFile
(
info
->
handle
,
&
io
,
&
basic_info
,
sizeof
(
basic_info
),
FileBasicInformation
))
||
(
status
=
NtQueryInformationFile
(
info
->
handle
,
&
io
,
&
std_info
,
sizeof
(
std_info
),
FileStandardInformation
)))
(
status
=
NtQueryInformationFile
(
info
->
handle
,
&
io
,
&
std_info
,
sizeof
(
std_info
),
FileStandardInformation
)))
{
{
WARN
(
":failed-error %
x
\n
"
,
status
);
WARN
(
":failed-error %
lx
\n
"
,
status
);
msvcrt_set_errno
(
ERROR_INVALID_PARAMETER
);
msvcrt_set_errno
(
ERROR_INVALID_PARAMETER
);
release_ioinfo
(
info
);
release_ioinfo
(
info
);
return
-
1
;
return
-
1
;
...
@@ -1816,7 +1816,8 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
...
@@ -1816,7 +1816,8 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
RtlTimeToSecondsSince1970
((
LARGE_INTEGER
*
)
&
basic_info
.
LastWriteTime
,
&
dw
);
RtlTimeToSecondsSince1970
((
LARGE_INTEGER
*
)
&
basic_info
.
LastWriteTime
,
&
dw
);
buf
->
st_mtime
=
buf
->
st_ctime
=
dw
;
buf
->
st_mtime
=
buf
->
st_ctime
=
dw
;
buf
->
st_nlink
=
std_info
.
NumberOfLinks
;
buf
->
st_nlink
=
std_info
.
NumberOfLinks
;
TRACE
(
":dwFileAttributes = 0x%x, mode set to 0x%x
\n
"
,
basic_info
.
FileAttributes
,
buf
->
st_mode
);
TRACE
(
":dwFileAttributes = 0x%lx, mode set to 0x%x
\n
"
,
basic_info
.
FileAttributes
,
buf
->
st_mode
);
}
}
release_ioinfo
(
info
);
release_ioinfo
(
info
);
return
0
;
return
0
;
...
@@ -2303,7 +2304,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm
...
@@ -2303,7 +2304,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm
hand
=
CreateFileW
(
path
,
access
,
sharing
,
&
sa
,
creation
,
attrib
,
0
);
hand
=
CreateFileW
(
path
,
access
,
sharing
,
&
sa
,
creation
,
attrib
,
0
);
if
(
hand
==
INVALID_HANDLE_VALUE
)
{
if
(
hand
==
INVALID_HANDLE_VALUE
)
{
WARN
(
":failed-last error (%
d)
\n
"
,
GetLastError
());
WARN
(
":failed-last error (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
*
_errno
();
return
*
_errno
();
}
}
...
@@ -2547,7 +2548,7 @@ int CDECL _open_osfhandle(intptr_t handle, int oflags)
...
@@ -2547,7 +2548,7 @@ int CDECL _open_osfhandle(intptr_t handle, int oflags)
flags
|=
split_oflags
(
oflags
);
flags
|=
split_oflags
(
oflags
);
fd
=
msvcrt_alloc_fd
((
HANDLE
)
handle
,
flags
);
fd
=
msvcrt_alloc_fd
((
HANDLE
)
handle
,
flags
);
TRACE
(
":handle (%Iu) fd (%d) flags 0x%08x
\n
"
,
handle
,
fd
,
flags
);
TRACE
(
":handle (%Iu) fd (%d) flags 0x%08
l
x
\n
"
,
handle
,
fd
,
flags
);
return
fd
;
return
fd
;
}
}
...
@@ -2913,14 +2914,14 @@ static int read_i(int fd, ioinfo *fdinfo, void *buf, unsigned int count)
...
@@ -2913,14 +2914,14 @@ static int read_i(int fd, ioinfo *fdinfo, void *buf, unsigned int count)
}
}
else
else
{
{
TRACE
(
":failed-last error (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed-last error (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
}
}
if
(
count
>
4
)
if
(
count
>
4
)
TRACE
(
"(%
u), %s
\n
"
,
num_read
,
debugstr_an
(
buf
,
num_read
));
TRACE
(
"(%
lu), %s
\n
"
,
num_read
,
debugstr_an
(
buf
,
num_read
));
return
num_read
;
return
num_read
;
}
}
...
@@ -2994,7 +2995,7 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
...
@@ -2994,7 +2995,7 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
unsigned
short
mode
=
ALL_S_IREAD
;
unsigned
short
mode
=
ALL_S_IREAD
;
int
plen
;
int
plen
;
TRACE
(
":file (%s) buf(%p)
\n
"
,
path
,
buf
);
TRACE
(
":file (%s) buf(%p)
\n
"
,
path
,
buf
);
plen
=
strlen
(
path
);
plen
=
strlen
(
path
);
while
(
plen
&&
path
[
plen
-
1
]
==
' '
)
while
(
plen
&&
path
[
plen
-
1
]
==
' '
)
...
@@ -3016,7 +3017,7 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
...
@@ -3016,7 +3017,7 @@ int CDECL _stat64(const char* path, struct _stat64 * buf)
if
(
!
GetFileAttributesExA
(
path
,
GetFileExInfoStandard
,
&
hfi
))
if
(
!
GetFileAttributesExA
(
path
,
GetFileExInfoStandard
,
&
hfi
))
{
{
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
*
_errno
()
=
ENOENT
;
*
_errno
()
=
ENOENT
;
return
-
1
;
return
-
1
;
}
}
...
@@ -3150,7 +3151,7 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
...
@@ -3150,7 +3151,7 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
unsigned
short
mode
=
ALL_S_IREAD
;
unsigned
short
mode
=
ALL_S_IREAD
;
int
plen
;
int
plen
;
TRACE
(
":file (%s) buf(%p)
\n
"
,
debugstr_w
(
path
),
buf
);
TRACE
(
":file (%s) buf(%p)
\n
"
,
debugstr_w
(
path
),
buf
);
plen
=
wcslen
(
path
);
plen
=
wcslen
(
path
);
while
(
plen
&&
path
[
plen
-
1
]
==
' '
)
while
(
plen
&&
path
[
plen
-
1
]
==
' '
)
...
@@ -3172,7 +3173,7 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
...
@@ -3172,7 +3173,7 @@ int CDECL _wstat64(const wchar_t* path, struct _stat64 * buf)
if
(
!
GetFileAttributesExW
(
path
,
GetFileExInfoStandard
,
&
hfi
))
if
(
!
GetFileAttributesExW
(
path
,
GetFileExInfoStandard
,
&
hfi
))
{
{
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
*
_errno
()
=
ENOENT
;
*
_errno
()
=
ENOENT
;
return
-
1
;
return
-
1
;
}
}
...
@@ -3316,14 +3317,14 @@ char * CDECL _tempnam(const char *dir, const char *prefix)
...
@@ -3316,14 +3317,14 @@ char * CDECL _tempnam(const char *dir, const char *prefix)
if
(
tmp_dir
)
dir
=
tmp_dir
;
if
(
tmp_dir
)
dir
=
tmp_dir
;
TRACE
(
"dir (%s) prefix (%s)
\n
"
,
dir
,
prefix
);
TRACE
(
"dir (%s) prefix (%s)
\n
"
,
dir
,
prefix
);
if
(
GetTempFileNameA
(
dir
,
prefix
,
0
,
tmpbuf
))
if
(
GetTempFileNameA
(
dir
,
prefix
,
0
,
tmpbuf
))
{
{
TRACE
(
"got name (%s)
\n
"
,
tmpbuf
);
TRACE
(
"got name (%s)
\n
"
,
tmpbuf
);
DeleteFileA
(
tmpbuf
);
DeleteFileA
(
tmpbuf
);
return
_strdup
(
tmpbuf
);
return
_strdup
(
tmpbuf
);
}
}
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
return
NULL
;
return
NULL
;
}
}
...
@@ -3337,14 +3338,14 @@ wchar_t * CDECL _wtempnam(const wchar_t *dir, const wchar_t *prefix)
...
@@ -3337,14 +3338,14 @@ wchar_t * CDECL _wtempnam(const wchar_t *dir, const wchar_t *prefix)
if
(
tmp_dir
)
dir
=
tmp_dir
;
if
(
tmp_dir
)
dir
=
tmp_dir
;
TRACE
(
"dir (%s) prefix (%s)
\n
"
,
debugstr_w
(
dir
),
debugstr_w
(
prefix
));
TRACE
(
"dir (%s) prefix (%s)
\n
"
,
debugstr_w
(
dir
),
debugstr_w
(
prefix
));
if
(
GetTempFileNameW
(
dir
,
prefix
,
0
,
tmpbuf
))
if
(
GetTempFileNameW
(
dir
,
prefix
,
0
,
tmpbuf
))
{
{
TRACE
(
"got name (%s)
\n
"
,
debugstr_w
(
tmpbuf
));
TRACE
(
"got name (%s)
\n
"
,
debugstr_w
(
tmpbuf
));
DeleteFileW
(
tmpbuf
);
DeleteFileW
(
tmpbuf
);
return
_wcsdup
(
tmpbuf
);
return
_wcsdup
(
tmpbuf
);
}
}
TRACE
(
"failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
"failed (%
ld)
\n
"
,
GetLastError
());
return
NULL
;
return
NULL
;
}
}
...
@@ -3456,7 +3457,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
...
@@ -3456,7 +3457,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
if
(
!
WriteFile
(
hand
,
buf
,
count
,
&
num_written
,
NULL
)
if
(
!
WriteFile
(
hand
,
buf
,
count
,
&
num_written
,
NULL
)
||
num_written
!=
count
)
||
num_written
!=
count
)
{
{
TRACE
(
"WriteFile (fd %d, hand %p) failed-last error (%d)
\n
"
,
fd
,
TRACE
(
"WriteFile (fd %d, hand %p) failed-last error (%
l
d)
\n
"
,
fd
,
hand
,
GetLastError
());
hand
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
num_written
=
-
1
;
num_written
=
-
1
;
...
@@ -3584,7 +3585,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
...
@@ -3584,7 +3585,7 @@ int CDECL _write(int fd, const void* buf, unsigned int count)
if
(
num_written
!=
j
)
if
(
num_written
!=
j
)
{
{
TRACE
(
"WriteFile/WriteConsoleW (fd %d, hand %p) failed-last error (%d)
\n
"
,
fd
,
TRACE
(
"WriteFile/WriteConsoleW (fd %d, hand %p) failed-last error (%
l
d)
\n
"
,
fd
,
hand
,
GetLastError
());
hand
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
release_ioinfo
(
info
);
release_ioinfo
(
info
);
...
@@ -4840,10 +4841,10 @@ int CDECL _putws(const wchar_t *s)
...
@@ -4840,10 +4841,10 @@ int CDECL _putws(const wchar_t *s)
*/
*/
int
CDECL
remove
(
const
char
*
path
)
int
CDECL
remove
(
const
char
*
path
)
{
{
TRACE
(
"(%s)
\n
"
,
path
);
TRACE
(
"(%s)
\n
"
,
path
);
if
(
DeleteFileA
(
path
))
if
(
DeleteFileA
(
path
))
return
0
;
return
0
;
TRACE
(
":failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -4853,10 +4854,10 @@ int CDECL remove(const char *path)
...
@@ -4853,10 +4854,10 @@ int CDECL remove(const char *path)
*/
*/
int
CDECL
_wremove
(
const
wchar_t
*
path
)
int
CDECL
_wremove
(
const
wchar_t
*
path
)
{
{
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
path
));
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
path
));
if
(
DeleteFileW
(
path
))
if
(
DeleteFileW
(
path
))
return
0
;
return
0
;
TRACE
(
":failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -4866,10 +4867,10 @@ int CDECL _wremove(const wchar_t *path)
...
@@ -4866,10 +4867,10 @@ int CDECL _wremove(const wchar_t *path)
*/
*/
int
CDECL
rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
int
CDECL
rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
{
{
TRACE
(
":from %s to %s
\n
"
,
oldpath
,
newpath
);
TRACE
(
":from %s to %s
\n
"
,
oldpath
,
newpath
);
if
(
MoveFileExA
(
oldpath
,
newpath
,
MOVEFILE_COPY_ALLOWED
))
if
(
MoveFileExA
(
oldpath
,
newpath
,
MOVEFILE_COPY_ALLOWED
))
return
0
;
return
0
;
TRACE
(
":failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
@@ -4879,10 +4880,10 @@ int CDECL rename(const char *oldpath,const char *newpath)
...
@@ -4879,10 +4880,10 @@ int CDECL rename(const char *oldpath,const char *newpath)
*/
*/
int
CDECL
_wrename
(
const
wchar_t
*
oldpath
,
const
wchar_t
*
newpath
)
int
CDECL
_wrename
(
const
wchar_t
*
oldpath
,
const
wchar_t
*
newpath
)
{
{
TRACE
(
":from %s to %s
\n
"
,
debugstr_w
(
oldpath
),
debugstr_w
(
newpath
));
TRACE
(
":from %s to %s
\n
"
,
debugstr_w
(
oldpath
),
debugstr_w
(
newpath
));
if
(
MoveFileExW
(
oldpath
,
newpath
,
MOVEFILE_COPY_ALLOWED
))
if
(
MoveFileExW
(
oldpath
,
newpath
,
MOVEFILE_COPY_ALLOWED
))
return
0
;
return
0
;
TRACE
(
":failed (%
d)
\n
"
,
GetLastError
());
TRACE
(
":failed (%
ld)
\n
"
,
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
msvcrt_set_errno
(
GetLastError
());
return
-
1
;
return
-
1
;
}
}
...
...
dlls/msvcrt/locale.c
View file @
9b802a3d
...
@@ -854,7 +854,7 @@ int CDECL __crtLCMapStringA(
...
@@ -854,7 +854,7 @@ int CDECL __crtLCMapStringA(
WCHAR
buf_out
[
32
],
*
out
=
buf_out
;
WCHAR
buf_out
[
32
],
*
out
=
buf_out
;
int
in_len
,
out_len
,
r
;
int
in_len
,
out_len
,
r
;
TRACE
(
"(lcid %
x, flags %
x, %s(%d), %p(%d), %x, %d), partial stub!
\n
"
,
TRACE
(
"(lcid %
lx, flags %l
x, %s(%d), %p(%d), %x, %d), partial stub!
\n
"
,
lcid
,
mapflags
,
src
,
srclen
,
dst
,
dstlen
,
codepage
,
xflag
);
lcid
,
mapflags
,
src
,
srclen
,
dst
,
dstlen
,
codepage
,
xflag
);
in_len
=
MultiByteToWideChar
(
codepage
,
MB_ERR_INVALID_CHARS
,
src
,
srclen
,
NULL
,
0
);
in_len
=
MultiByteToWideChar
(
codepage
,
MB_ERR_INVALID_CHARS
,
src
,
srclen
,
NULL
,
0
);
...
@@ -904,7 +904,7 @@ done:
...
@@ -904,7 +904,7 @@ done:
int
CDECL
__crtLCMapStringW
(
LCID
lcid
,
DWORD
mapflags
,
const
wchar_t
*
src
,
int
CDECL
__crtLCMapStringW
(
LCID
lcid
,
DWORD
mapflags
,
const
wchar_t
*
src
,
int
srclen
,
wchar_t
*
dst
,
int
dstlen
,
unsigned
int
codepage
,
int
xflag
)
int
srclen
,
wchar_t
*
dst
,
int
dstlen
,
unsigned
int
codepage
,
int
xflag
)
{
{
FIXME
(
"(lcid %
x, flags %
x, %s(%d), %p(%d), %x, %d), partial stub!
\n
"
,
FIXME
(
"(lcid %
lx, flags %l
x, %s(%d), %p(%d), %x, %d), partial stub!
\n
"
,
lcid
,
mapflags
,
debugstr_w
(
src
),
srclen
,
dst
,
dstlen
,
codepage
,
xflag
);
lcid
,
mapflags
,
debugstr_w
(
src
),
srclen
,
dst
,
dstlen
,
codepage
,
xflag
);
return
LCMapStringW
(
lcid
,
mapflags
,
src
,
srclen
,
dst
,
dstlen
);
return
LCMapStringW
(
lcid
,
mapflags
,
src
,
srclen
,
dst
,
dstlen
);
...
@@ -916,7 +916,7 @@ int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src,
...
@@ -916,7 +916,7 @@ int CDECL __crtLCMapStringW(LCID lcid, DWORD mapflags, const wchar_t *src,
int
CDECL
__crtCompareStringA
(
LCID
lcid
,
DWORD
flags
,
const
char
*
src1
,
int
len1
,
int
CDECL
__crtCompareStringA
(
LCID
lcid
,
DWORD
flags
,
const
char
*
src1
,
int
len1
,
const
char
*
src2
,
int
len2
)
const
char
*
src2
,
int
len2
)
{
{
FIXME
(
"(lcid %
x, flags %
x, %s(%d), %s(%d), partial stub
\n
"
,
FIXME
(
"(lcid %
lx, flags %l
x, %s(%d), %s(%d), partial stub
\n
"
,
lcid
,
flags
,
debugstr_a
(
src1
),
len1
,
debugstr_a
(
src2
),
len2
);
lcid
,
flags
,
debugstr_a
(
src1
),
len1
,
debugstr_a
(
src2
),
len2
);
/* FIXME: probably not entirely right */
/* FIXME: probably not entirely right */
return
CompareStringA
(
lcid
,
flags
,
src1
,
len1
,
src2
,
len2
);
return
CompareStringA
(
lcid
,
flags
,
src1
,
len1
,
src2
,
len2
);
...
@@ -928,7 +928,7 @@ int CDECL __crtCompareStringA( LCID lcid, DWORD flags, const char *src1, int len
...
@@ -928,7 +928,7 @@ int CDECL __crtCompareStringA( LCID lcid, DWORD flags, const char *src1, int len
int
CDECL
__crtCompareStringW
(
LCID
lcid
,
DWORD
flags
,
const
wchar_t
*
src1
,
int
len1
,
int
CDECL
__crtCompareStringW
(
LCID
lcid
,
DWORD
flags
,
const
wchar_t
*
src1
,
int
len1
,
const
wchar_t
*
src2
,
int
len2
)
const
wchar_t
*
src2
,
int
len2
)
{
{
FIXME
(
"(lcid %
x, flags %
x, %s(%d), %s(%d), partial stub
\n
"
,
FIXME
(
"(lcid %
lx, flags %l
x, %s(%d), %s(%d), partial stub
\n
"
,
lcid
,
flags
,
debugstr_w
(
src1
),
len1
,
debugstr_w
(
src2
),
len2
);
lcid
,
flags
,
debugstr_w
(
src1
),
len1
,
debugstr_w
(
src2
),
len2
);
/* FIXME: probably not entirely right */
/* FIXME: probably not entirely right */
return
CompareStringW
(
lcid
,
flags
,
src1
,
len1
,
src2
,
len2
);
return
CompareStringW
(
lcid
,
flags
,
src1
,
len1
,
src2
,
len2
);
...
@@ -939,7 +939,7 @@ int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const wchar_t *src1, int
...
@@ -939,7 +939,7 @@ int CDECL __crtCompareStringW( LCID lcid, DWORD flags, const wchar_t *src1, int
*/
*/
int
CDECL
__crtGetLocaleInfoW
(
LCID
lcid
,
LCTYPE
type
,
wchar_t
*
buffer
,
int
len
)
int
CDECL
__crtGetLocaleInfoW
(
LCID
lcid
,
LCTYPE
type
,
wchar_t
*
buffer
,
int
len
)
{
{
FIXME
(
"(lcid %
x, type %
x, %p(%d), partial stub
\n
"
,
lcid
,
type
,
buffer
,
len
);
FIXME
(
"(lcid %
lx, type %l
x, %p(%d), partial stub
\n
"
,
lcid
,
type
,
buffer
,
len
);
/* FIXME: probably not entirely right */
/* FIXME: probably not entirely right */
return
GetLocaleInfoW
(
lcid
,
type
,
buffer
,
len
);
return
GetLocaleInfoW
(
lcid
,
type
,
buffer
,
len
);
}
}
...
@@ -950,7 +950,7 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, wchar_t *buffer, int len
...
@@ -950,7 +950,7 @@ int CDECL __crtGetLocaleInfoW( LCID lcid, LCTYPE type, wchar_t *buffer, int len
*/
*/
int
CDECL
__crtGetLocaleInfoEx
(
const
WCHAR
*
locale
,
LCTYPE
type
,
wchar_t
*
buffer
,
int
len
)
int
CDECL
__crtGetLocaleInfoEx
(
const
WCHAR
*
locale
,
LCTYPE
type
,
wchar_t
*
buffer
,
int
len
)
{
{
TRACE
(
"(%s, %x, %p, %d)
\n
"
,
debugstr_w
(
locale
),
type
,
buffer
,
len
);
TRACE
(
"(%s, %
l
x, %p, %d)
\n
"
,
debugstr_w
(
locale
),
type
,
buffer
,
len
);
return
GetLocaleInfoEx
(
locale
,
type
,
buffer
,
len
);
return
GetLocaleInfoEx
(
locale
,
type
,
buffer
,
len
);
}
}
#endif
#endif
...
@@ -964,7 +964,7 @@ int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, wchar_t *buffe
...
@@ -964,7 +964,7 @@ int CDECL __crtGetLocaleInfoEx( const WCHAR *locale, LCTYPE type, wchar_t *buffe
BOOL
CDECL
__crtGetStringTypeW
(
DWORD
unk
,
DWORD
type
,
BOOL
CDECL
__crtGetStringTypeW
(
DWORD
unk
,
DWORD
type
,
wchar_t
*
buffer
,
int
len
,
WORD
*
out
)
wchar_t
*
buffer
,
int
len
,
WORD
*
out
)
{
{
FIXME
(
"(unk %
x, type %
x, wstr %p(%d), %p) partial stub
\n
"
,
FIXME
(
"(unk %
lx, type %l
x, wstr %p(%d), %p) partial stub
\n
"
,
unk
,
type
,
buffer
,
len
,
out
);
unk
,
type
,
buffer
,
len
,
out
);
return
GetStringTypeW
(
type
,
buffer
,
len
,
out
);
return
GetStringTypeW
(
type
,
buffer
,
len
,
out
);
...
...
dlls/msvcrt/main.c
View file @
9b802a3d
...
@@ -89,7 +89,7 @@ static inline void msvcrt_free_tls_mem(void)
...
@@ -89,7 +89,7 @@ static inline void msvcrt_free_tls_mem(void)
*/
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
{
TRACE
(
"(%p, %s, %p) pid(%
x), tid(%x), tls(%
u)
\n
"
,
TRACE
(
"(%p, %s, %p) pid(%
lx), tid(%lx), tls(%l
u)
\n
"
,
hinstDLL
,
msvcrt_get_reason
(
fdwReason
),
lpvReserved
,
hinstDLL
,
msvcrt_get_reason
(
fdwReason
),
lpvReserved
,
GetCurrentProcessId
(),
GetCurrentThreadId
(),
GetCurrentProcessId
(),
GetCurrentThreadId
(),
msvcrt_tls_index
);
msvcrt_tls_index
);
...
...
dlls/msvcrt/math.c
View file @
9b802a3d
...
@@ -10318,7 +10318,7 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res,
...
@@ -10318,7 +10318,7 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res,
WORD
operation
;
WORD
operation
;
int
raise
=
0
;
int
raise
=
0
;
TRACE
(
"(%
x %x %lf %lf %
x %p)
\n
"
,
fpe
,
op
,
arg
,
res
,
cw
,
unk
);
TRACE
(
"(%
lx %x %lf %lf %l
x %p)
\n
"
,
fpe
,
op
,
arg
,
res
,
cw
,
unk
);
#ifdef _WIN64
#ifdef _WIN64
cw
=
((
cw
>>
7
)
&
0x3f
)
|
((
cw
>>
3
)
&
0xc00
);
cw
=
((
cw
>>
7
)
&
0x3f
)
|
((
cw
>>
3
)
&
0xc00
);
...
...
dlls/msvcrt/mbcs.c
View file @
9b802a3d
...
@@ -325,7 +325,10 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
...
@@ -325,7 +325,10 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
ret
=
MultiByteToWideChar
(
newcp
,
0
,
bufA
,
charcount
,
bufW
,
charcount
);
ret
=
MultiByteToWideChar
(
newcp
,
0
,
bufA
,
charcount
,
bufW
,
charcount
);
if
(
ret
!=
charcount
)
if
(
ret
!=
charcount
)
ERR
(
"MultiByteToWideChar of chars failed for cp %d, ret=%d (exp %d), error=%d
\n
"
,
newcp
,
ret
,
charcount
,
GetLastError
());
{
ERR
(
"MultiByteToWideChar of chars failed for cp %d, ret=%d (exp %d), error=%ld
\n
"
,
newcp
,
ret
,
charcount
,
GetLastError
());
}
GetStringTypeW
(
CT_CTYPE1
,
bufW
,
charcount
,
chartypes
);
GetStringTypeW
(
CT_CTYPE1
,
bufW
,
charcount
,
chartypes
);
LCMapStringW
(
lcid
,
LCMAP_LOWERCASE
,
bufW
,
charcount
,
lowW
,
charcount
);
LCMapStringW
(
lcid
,
LCMAP_LOWERCASE
,
bufW
,
charcount
,
lowW
,
charcount
);
...
@@ -350,7 +353,10 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
...
@@ -350,7 +353,10 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
ret
=
WideCharToMultiByte
(
newcp
,
0
,
bufW
,
charcount
,
bufA
,
charcount
,
NULL
,
NULL
);
ret
=
WideCharToMultiByte
(
newcp
,
0
,
bufW
,
charcount
,
bufA
,
charcount
,
NULL
,
NULL
);
if
(
ret
!=
charcount
)
if
(
ret
!=
charcount
)
ERR
(
"WideCharToMultiByte failed for cp %d, ret=%d (exp %d), error=%d
\n
"
,
newcp
,
ret
,
charcount
,
GetLastError
());
{
ERR
(
"WideCharToMultiByte failed for cp %d, ret=%d (exp %d), error=%ld
\n
"
,
newcp
,
ret
,
charcount
,
GetLastError
());
}
charcount
=
0
;
charcount
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
...
...
dlls/msvcrt/misc.c
View file @
9b802a3d
...
@@ -516,7 +516,7 @@ int CDECL __crtGetShowWindowMode(void)
...
@@ -516,7 +516,7 @@ int CDECL __crtGetShowWindowMode(void)
STARTUPINFOW
si
;
STARTUPINFOW
si
;
GetStartupInfoW
(
&
si
);
GetStartupInfoW
(
&
si
);
TRACE
(
"flags=%x window=%d
\n
"
,
si
.
dwFlags
,
si
.
wShowWindow
);
TRACE
(
"flags=%
l
x window=%d
\n
"
,
si
.
dwFlags
,
si
.
wShowWindow
);
return
si
.
dwFlags
&
STARTF_USESHOWWINDOW
?
si
.
wShowWindow
:
SW_SHOWDEFAULT
;
return
si
.
dwFlags
&
STARTF_USESHOWWINDOW
?
si
.
wShowWindow
:
SW_SHOWDEFAULT
;
}
}
...
@@ -526,7 +526,7 @@ int CDECL __crtGetShowWindowMode(void)
...
@@ -526,7 +526,7 @@ int CDECL __crtGetShowWindowMode(void)
BOOL
CDECL
__crtInitializeCriticalSectionEx
(
BOOL
CDECL
__crtInitializeCriticalSectionEx
(
CRITICAL_SECTION
*
cs
,
DWORD
spin_count
,
DWORD
flags
)
CRITICAL_SECTION
*
cs
,
DWORD
spin_count
,
DWORD
flags
)
{
{
TRACE
(
"(%p %
x %
x)
\n
"
,
cs
,
spin_count
,
flags
);
TRACE
(
"(%p %
lx %l
x)
\n
"
,
cs
,
spin_count
,
flags
);
return
InitializeCriticalSectionEx
(
cs
,
spin_count
,
flags
);
return
InitializeCriticalSectionEx
(
cs
,
spin_count
,
flags
);
}
}
...
@@ -570,7 +570,7 @@ LONG CDECL __crtUnhandledException(EXCEPTION_POINTERS *ep)
...
@@ -570,7 +570,7 @@ LONG CDECL __crtUnhandledException(EXCEPTION_POINTERS *ep)
*/
*/
void
CDECL
__crtSleep
(
DWORD
timeout
)
void
CDECL
__crtSleep
(
DWORD
timeout
)
{
{
TRACE
(
"(%u)
\n
"
,
timeout
);
TRACE
(
"(%
l
u)
\n
"
,
timeout
);
Sleep
(
timeout
);
Sleep
(
timeout
);
}
}
...
...
dlls/msvcrt/thread.c
View file @
9b802a3d
...
@@ -164,7 +164,7 @@ uintptr_t CDECL _beginthread(
...
@@ -164,7 +164,7 @@ uintptr_t CDECL _beginthread(
(
void
*
)
start_address
,
&
trampoline
->
module
))
(
void
*
)
start_address
,
&
trampoline
->
module
))
{
{
trampoline
->
module
=
NULL
;
trampoline
->
module
=
NULL
;
WARN
(
"failed to get module for the start_address: %
d
\n
"
,
GetLastError
());
WARN
(
"failed to get module for the start_address: %
lu
\n
"
,
GetLastError
());
}
}
#endif
#endif
...
@@ -230,7 +230,7 @@ uintptr_t CDECL _beginthreadex(
...
@@ -230,7 +230,7 @@ uintptr_t CDECL _beginthreadex(
(
void
*
)
start_address
,
&
trampoline
->
module
))
(
void
*
)
start_address
,
&
trampoline
->
module
))
{
{
trampoline
->
module
=
NULL
;
trampoline
->
module
=
NULL
;
WARN
(
"failed to get module for the start_address: %
d
\n
"
,
GetLastError
());
WARN
(
"failed to get module for the start_address: %
lu
\n
"
,
GetLastError
());
}
}
#endif
#endif
...
...
dlls/msvcrtd/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
msvcrtd.dll
MODULE
=
msvcrtd.dll
IMPORTLIB
=
msvcrtd
IMPORTLIB
=
msvcrtd
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
dlls/ucrtbase/Makefile.in
View file @
9b802a3d
EXTRADEFS
=
-D
WINE_NO_LONG_TYPES
-D
_CRTIMP
=
EXTRADEFS
=
-D_CRTIMP
=
MODULE
=
ucrtbase.dll
MODULE
=
ucrtbase.dll
IMPORTLIB
=
ucrtbase
IMPORTLIB
=
ucrtbase
IMPORTS
=
ntdll
IMPORTS
=
ntdll
...
...
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