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
74a5851e
Commit
74a5851e
authored
Nov 21, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use int instead of long types in a few places.
To avoid typecasts in debug traces.
parent
1a7cacc4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
79 deletions
+78
-79
debug.c
dlls/ntdll/unix/debug.c
+1
-1
env.c
dlls/ntdll/unix/env.c
+3
-3
file.c
dlls/ntdll/unix/file.c
+8
-8
serial.c
dlls/ntdll/unix/serial.c
+9
-9
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+24
-25
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+29
-29
socket.c
dlls/ntdll/unix/socket.c
+1
-1
tape.c
dlls/ntdll/unix/tape.c
+1
-1
afd.h
include/wine/afd.h
+2
-2
No files found.
dlls/ntdll/unix/debug.c
View file @
74a5851e
...
...
@@ -299,7 +299,7 @@ int __cdecl __wine_dbg_header( enum __wine_debug_class cls, struct __wine_debug_
{
if
(
TRACE_ON
(
timestamp
))
{
U
LONG
ticks
=
NtGetTickCount
();
U
INT
ticks
=
NtGetTickCount
();
pos
+=
sprintf
(
pos
,
"%3u.%03u:"
,
ticks
/
1000
,
ticks
%
1000
);
}
if
(
TRACE_ON
(
pid
))
pos
+=
sprintf
(
pos
,
"%04x:"
,
GetCurrentProcessId
()
);
...
...
dlls/ntdll/unix/env.c
View file @
74a5851e
...
...
@@ -85,7 +85,7 @@ const WCHAR system_dir[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','
static
CPTABLEINFO
unix_cp
=
{
CP_UTF8
,
4
,
'?'
,
0xfffd
,
'?'
,
'?'
};
static
char
*
get_nls_file_path
(
U
LONG
type
,
ULONG
id
)
static
char
*
get_nls_file_path
(
U
INT
type
,
UINT
id
)
{
const
char
*
dir
=
build_dir
?
build_dir
:
data_dir
;
const
char
*
name
=
NULL
;
...
...
@@ -169,7 +169,7 @@ static NTSTATUS open_nls_data_file( const char *path, const WCHAR *sysdir, HANDL
return
status
;
}
static
NTSTATUS
get_nls_section_name
(
U
LONG
type
,
ULONG
id
,
WCHAR
name
[
32
]
)
static
NTSTATUS
get_nls_section_name
(
U
INT
type
,
UINT
id
,
WCHAR
name
[
32
]
)
{
char
buffer
[
32
];
...
...
@@ -1068,7 +1068,7 @@ static void add_system_dll_path_var( WCHAR **env, SIZE_T *pos, SIZE_T *size )
static
void
add_dynamic_environment
(
WCHAR
**
env
,
SIZE_T
*
pos
,
SIZE_T
*
size
)
{
const
char
*
overrides
=
getenv
(
"WINEDLLOVERRIDES"
);
DWORD
i
;
unsigned
int
i
;
char
str
[
22
];
add_path_var
(
env
,
pos
,
size
,
"WINEDATADIR"
,
data_dir
);
...
...
dlls/ntdll/unix/file.c
View file @
74a5851e
...
...
@@ -1600,7 +1600,7 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
}
static
int
fd_set_dos_attrib
(
int
fd
,
U
LONG
attr
)
static
int
fd_set_dos_attrib
(
int
fd
,
U
INT
attr
)
{
/* we only store the HIDDEN and SYSTEM attributes */
attr
&=
XATTR_ATTRIBS_MASK
;
...
...
@@ -1618,7 +1618,7 @@ static int fd_set_dos_attrib( int fd, ULONG attr )
/* set the stat info and file attributes for a file (by file descriptor) */
NTSTATUS
fd_set_file_info
(
int
fd
,
U
LONG
attr
)
NTSTATUS
fd_set_file_info
(
int
fd
,
U
INT
attr
)
{
struct
stat
st
;
...
...
@@ -5338,7 +5338,7 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo
unsigned
int
options
;
struct
io_timeouts
timeouts
;
NTSTATUS
status
,
ret_status
;
U
LONG
total
=
0
;
U
INT
total
=
0
;
client_ptr_t
iosb_ptr
=
iosb_client_ptr
(
io
);
enum
server_fd_type
type
;
ULONG_PTR
cvalue
=
apc
?
0
:
(
ULONG_PTR
)
apc_user
;
...
...
@@ -5540,7 +5540,7 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
int
result
,
unix_handle
,
needs_close
;
unsigned
int
options
;
NTSTATUS
status
;
U
LONG
pos
=
0
,
total
=
0
;
U
INT
pos
=
0
,
total
=
0
;
client_ptr_t
iosb_ptr
=
iosb_client_ptr
(
io
);
enum
server_fd_type
type
;
ULONG_PTR
cvalue
=
apc
?
0
:
(
ULONG_PTR
)
apc_user
;
...
...
@@ -5619,7 +5619,7 @@ NTSTATUS WINAPI NtWriteFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, v
unsigned
int
options
;
struct
io_timeouts
timeouts
;
NTSTATUS
status
,
ret_status
;
U
LONG
total
=
0
;
U
INT
total
=
0
;
client_ptr_t
iosb_ptr
=
iosb_client_ptr
(
io
);
enum
server_fd_type
type
;
ULONG_PTR
cvalue
=
apc
?
0
:
(
ULONG_PTR
)
apc_user
;
...
...
@@ -5848,7 +5848,7 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
int
result
,
unix_handle
,
needs_close
;
unsigned
int
options
;
NTSTATUS
status
;
U
LONG
pos
=
0
,
total
=
0
;
U
INT
pos
=
0
,
total
=
0
;
client_ptr_t
iosb_ptr
=
iosb_client_ptr
(
io
);
enum
server_fd_type
type
;
ULONG_PTR
cvalue
=
apc
?
0
:
(
ULONG_PTR
)
apc_user
;
...
...
@@ -7094,8 +7094,8 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
OBJECT_TYPE_INFORMATION
*
p
;
struct
object_type_info
*
buffer
;
/* assume at most 32 types, with an average 16-char name */
U
LONG
size
=
32
*
(
sizeof
(
struct
object_type_info
)
+
16
*
sizeof
(
WCHAR
));
U
LONG
i
,
count
,
pos
,
total
,
align
=
sizeof
(
DWORD_PTR
)
-
1
;
U
INT
size
=
32
*
(
sizeof
(
struct
object_type_info
)
+
16
*
sizeof
(
WCHAR
));
U
INT
i
,
count
,
pos
,
total
,
align
=
sizeof
(
DWORD_PTR
)
-
1
;
buffer
=
malloc
(
size
);
SERVER_START_REQ
(
get_object_types
)
...
...
dlls/ntdll/unix/serial.c
View file @
74a5851e
...
...
@@ -295,7 +295,7 @@ static NTSTATUS get_line_control(int fd, SERIAL_LINE_CONTROL* slc)
return
STATUS_SUCCESS
;
}
static
NTSTATUS
get_modem_status
(
int
fd
,
DWORD
*
lpModemStat
)
static
NTSTATUS
get_modem_status
(
int
fd
,
UINT
*
lpModemStat
)
{
NTSTATUS
status
=
STATUS_NOT_SUPPORTED
;
int
mstat
;
...
...
@@ -418,7 +418,7 @@ static void stop_waiting( HANDLE handle )
SERVER_END_REQ
;
}
static
NTSTATUS
get_wait_mask
(
HANDLE
hDevice
,
DWORD
*
mask
,
DWORD
*
cookie
,
DWORD
*
pending_write
,
BOOL
start_wait
)
static
NTSTATUS
get_wait_mask
(
HANDLE
hDevice
,
UINT
*
mask
,
UINT
*
cookie
,
BOOL
*
pending_write
,
BOOL
start_wait
)
{
NTSTATUS
status
;
...
...
@@ -831,10 +831,10 @@ typedef struct async_commio
DWORD
*
events
;
client_ptr_t
iosb
;
HANDLE
hEvent
;
DWORD
evtmask
;
DWORD
cookie
;
DWORD
mstat
;
DWORD
pending_write
;
UINT
evtmask
;
UINT
cookie
;
UINT
mstat
;
BOOL
pending_write
;
serial_irq_info
irq_info
;
}
async_commio
;
...
...
@@ -890,10 +890,10 @@ static NTSTATUS get_irq_info(int fd, serial_irq_info *irq_info)
}
static
DWORD
check_events
(
int
fd
,
DWORD
mask
,
static
DWORD
check_events
(
int
fd
,
UINT
mask
,
const
serial_irq_info
*
new
,
const
serial_irq_info
*
old
,
DWORD
new_mstat
,
DWORD
old_mstat
,
DWORD
pending_write
)
UINT
new_mstat
,
UINT
old_mstat
,
BOOL
pending_write
)
{
DWORD
ret
=
0
,
queue
;
...
...
@@ -946,7 +946,7 @@ static void CALLBACK wait_for_event(LPVOID arg)
if
(
!
server_get_unix_fd
(
commio
->
hDevice
,
FILE_READ_DATA
|
FILE_WRITE_DATA
,
&
fd
,
&
needs_close
,
NULL
,
NULL
))
{
serial_irq_info
new_irq_info
;
DWORD
new_mstat
,
dummy
,
cookie
;
UINT
new_mstat
,
dummy
,
cookie
;
LARGE_INTEGER
time
;
TRACE
(
"device=%p fd=0x%08x mask=0x%08x buffer=%p event=%p irq_info=%p
\n
"
,
...
...
dlls/ntdll/unix/signal_arm.c
View file @
74a5851e
...
...
@@ -176,28 +176,28 @@ enum arm_trap_code
struct
syscall_frame
{
DWORD
r0
;
/* 000 */
DWORD
r1
;
/* 004 */
DWORD
r2
;
/* 008 */
DWORD
r3
;
/* 00c */
DWORD
r4
;
/* 010 */
DWORD
r5
;
/* 014 */
DWORD
r6
;
/* 018 */
DWORD
r7
;
/* 01c */
DWORD
r8
;
/* 020 */
DWORD
r9
;
/* 024 */
DWORD
r10
;
/* 028 */
DWORD
r11
;
/* 02c */
DWORD
r12
;
/* 030 */
DWORD
pc
;
/* 034 */
DWORD
sp
;
/* 038 */
DWORD
lr
;
/* 03c */
DWORD
cpsr
;
/* 040 */
DWORD
restore_flags
;
/* 044 */
DWORD
fpscr
;
/* 048 */
UINT
r0
;
/* 000 */
UINT
r1
;
/* 004 */
UINT
r2
;
/* 008 */
UINT
r3
;
/* 00c */
UINT
r4
;
/* 010 */
UINT
r5
;
/* 014 */
UINT
r6
;
/* 018 */
UINT
r7
;
/* 01c */
UINT
r8
;
/* 020 */
UINT
r9
;
/* 024 */
UINT
r10
;
/* 028 */
UINT
r11
;
/* 02c */
UINT
r12
;
/* 030 */
UINT
pc
;
/* 034 */
UINT
sp
;
/* 038 */
UINT
lr
;
/* 03c */
UINT
cpsr
;
/* 040 */
UINT
restore_flags
;
/* 044 */
UINT
fpscr
;
/* 048 */
struct
syscall_frame
*
prev_frame
;
/* 04c */
SYSTEM_SERVICE_TABLE
*
syscall_table
;
/* 050 */
DWORD
align
[
3
];
/* 054 */
UINT
align
[
3
];
/* 054 */
ULONGLONG
d
[
32
];
/* 060 */
};
...
...
@@ -301,7 +301,7 @@ static uint32_t regmask(int first_bit, int n_bits)
/***********************************************************************
* ehabi_virtual_unwind
*/
static
NTSTATUS
ehabi_virtual_unwind
(
DWORD
ip
,
DWORD
*
frame
,
CONTEXT
*
context
,
static
NTSTATUS
ehabi_virtual_unwind
(
UINT
ip
,
DWORD
*
frame
,
CONTEXT
*
context
,
const
struct
exidx_entry
*
entry
,
PEXCEPTION_ROUTINE
*
handler
,
void
**
handler_data
)
{
...
...
@@ -314,12 +314,11 @@ static NTSTATUS ehabi_virtual_unwind( DWORD ip, DWORD *frame, CONTEXT *context,
int
extra_words
;
int
finish
=
0
;
int
set_pc
=
0
;
DWORD
func_begin
=
prel31_to_abs
(
&
entry
->
addr
);
UINT
func_begin
=
prel31_to_abs
(
&
entry
->
addr
);
*
frame
=
context
->
Sp
;
TRACE
(
"ip %#x function %#lx
\n
"
,
ip
,
(
unsigned
long
)
func_begin
);
TRACE
(
"ip %#x function %#x
\n
"
,
ip
,
func_begin
);
if
(
entry
->
data
==
1
)
{
...
...
@@ -1255,7 +1254,7 @@ NTSTATUS WINAPI NtCallbackReturn( void *ret_ptr, ULONG ret_len, NTSTATUS status
static
BOOL
handle_syscall_fault
(
ucontext_t
*
context
,
EXCEPTION_RECORD
*
rec
)
{
struct
syscall_frame
*
frame
=
arm_thread_data
()
->
syscall_frame
;
DWORD
i
;
UINT
i
;
if
(
!
is_inside_syscall
(
context
)
&&
!
ntdll_get_thread_data
()
->
jmp_buf
)
return
FALSE
;
...
...
dlls/ntdll/unix/signal_i386.c
View file @
74a5851e
...
...
@@ -439,22 +439,22 @@ struct syscall_frame
{
WORD
syscall_flags
;
/* 000 */
WORD
restore_flags
;
/* 002 */
DWORD
eflags
;
/* 004 */
DWORD
eip
;
/* 008 */
DWORD
esp
;
/* 00c */
UINT
eflags
;
/* 004 */
UINT
eip
;
/* 008 */
UINT
esp
;
/* 00c */
WORD
cs
;
/* 010 */
WORD
ss
;
/* 012 */
WORD
ds
;
/* 014 */
WORD
es
;
/* 016 */
WORD
fs
;
/* 018 */
WORD
gs
;
/* 01a */
DWORD
eax
;
/* 01c */
DWORD
ebx
;
/* 020 */
DWORD
ecx
;
/* 024 */
DWORD
edx
;
/* 028 */
DWORD
edi
;
/* 02c */
DWORD
esi
;
/* 030 */
DWORD
ebp
;
/* 034 */
UINT
eax
;
/* 01c */
UINT
ebx
;
/* 020 */
UINT
ecx
;
/* 024 */
UINT
edx
;
/* 028 */
UINT
edi
;
/* 02c */
UINT
esi
;
/* 030 */
UINT
ebp
;
/* 034 */
SYSTEM_SERVICE_TABLE
*
syscall_table
;
/* 038 */
struct
syscall_frame
*
prev_frame
;
/* 03c */
union
/* 040 */
...
...
@@ -472,14 +472,14 @@ C_ASSERT( sizeof(struct syscall_frame) == 0x380 );
struct
x86_thread_data
{
DWORD
fs
;
/* 1d4 TEB selector */
DWORD
gs
;
/* 1d8 libc selector; update winebuild if you move this! */
DWORD
dr0
;
/* 1dc debug registers */
DWORD
dr1
;
/* 1e0 */
DWORD
dr2
;
/* 1e4 */
DWORD
dr3
;
/* 1e8 */
DWORD
dr6
;
/* 1ec */
DWORD
dr7
;
/* 1f0 */
UINT
fs
;
/* 1d4 TEB selector */
UINT
gs
;
/* 1d8 libc selector; update winebuild if you move this! */
UINT
dr0
;
/* 1dc debug registers */
UINT
dr1
;
/* 1e0 */
UINT
dr2
;
/* 1e4 */
UINT
dr3
;
/* 1e8 */
UINT
dr6
;
/* 1ec */
UINT
dr7
;
/* 1f0 */
void
*
exit_frame
;
/* 1f4 exit frame pointer */
struct
syscall_frame
*
syscall_frame
;
/* 1f8 frame pointer on syscall entry */
};
...
...
@@ -1275,37 +1275,37 @@ union atl_thunk
{
struct
{
DWORD
movl
;
/* movl this,4(%esp) */
DWORD
this
;
UINT
movl
;
/* movl this,4(%esp) */
UINT
this
;
BYTE
jmp
;
/* jmp func */
int
func
;
}
t1
;
struct
{
BYTE
movl
;
/* movl this,ecx */
DWORD
this
;
UINT
this
;
BYTE
jmp
;
/* jmp func */
int
func
;
}
t2
;
struct
{
BYTE
movl1
;
/* movl this,edx */
DWORD
this
;
UINT
this
;
BYTE
movl2
;
/* movl func,ecx */
DWORD
func
;
UINT
func
;
WORD
jmp
;
/* jmp ecx */
}
t3
;
struct
{
BYTE
movl1
;
/* movl this,ecx */
DWORD
this
;
UINT
this
;
BYTE
movl2
;
/* movl func,eax */
DWORD
func
;
UINT
func
;
WORD
jmp
;
/* jmp eax */
}
t4
;
struct
{
DWORD
inst1
;
/* pop ecx
UINT
inst1
;
/* pop ecx
* pop eax
* push ecx
* jmp 4(%eax) */
...
...
@@ -1769,7 +1769,7 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, void *stack_ptr,
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
struct
syscall_frame
*
frame
=
x86_thread_data
()
->
syscall_frame
;
DWORD
i
,
*
stack
;
UINT
i
,
*
stack
;
if
(
!
is_inside_syscall
(
sigcontext
)
&&
!
ntdll_get_thread_data
()
->
jmp_buf
)
return
FALSE
;
...
...
@@ -1800,9 +1800,9 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, void *stack_ptr,
else
{
TRACE
(
"returning to user mode ip=%08x ret=%08x
\n
"
,
frame
->
eip
,
rec
->
ExceptionCode
);
stack
=
(
DWORD
*
)
frame
;
stack
=
(
UINT
*
)
frame
;
*
(
--
stack
)
=
rec
->
ExceptionCode
;
*
(
--
stack
)
=
(
DWORD
)
frame
;
*
(
--
stack
)
=
(
UINT
)
frame
;
*
(
--
stack
)
=
0xdeadbabe
;
/* return address */
ESP_sig
(
sigcontext
)
=
(
DWORD
)
stack
;
EIP_sig
(
sigcontext
)
=
(
DWORD
)
__wine_syscall_dispatcher_return
;
...
...
dlls/ntdll/unix/socket.c
View file @
74a5851e
...
...
@@ -144,7 +144,7 @@ struct async_transmit_ioctl
unsigned
int
buffer_cursor
;
/* amount of data currently in the buffer already sent */
unsigned
int
tail_cursor
;
/* amount of tail data already sent */
unsigned
int
file_len
;
/* total file length to send */
DWORD
flags
;
unsigned
int
flags
;
const
char
*
head
;
const
char
*
tail
;
unsigned
int
head_len
;
...
...
dlls/ntdll/unix/tape.c
View file @
74a5851e
...
...
@@ -253,7 +253,7 @@ static NTSTATUS TAPE_GetMediaParams( int fd, TAPE_GET_MEDIA_PARAMETERS *data )
/******************************************************************
* TAPE_GetPosition
*/
static
NTSTATUS
TAPE_GetPosition
(
int
fd
,
U
LONG
type
,
TAPE_GET_POSITION
*
data
)
static
NTSTATUS
TAPE_GetPosition
(
int
fd
,
U
INT
type
,
TAPE_GET_POSITION
*
data
)
{
#ifdef HAVE_SYS_MTIO_H
struct
mtget
get
;
...
...
include/wine/afd.h
View file @
74a5851e
...
...
@@ -27,8 +27,8 @@
struct
afd_wsabuf_32
{
U
LONG
len
;
U
LONG
buf
;
U
INT
len
;
U
INT
buf
;
};
#ifdef USE_WS_PREFIX
...
...
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