Commit 310d7c68 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

ntdll: Use correct integral type.

parent 1c374a7c
...@@ -532,7 +532,7 @@ enum context_sections ...@@ -532,7 +532,7 @@ enum context_sections
typedef struct _ACTIVATION_CONTEXT typedef struct _ACTIVATION_CONTEXT
{ {
ULONG magic; ULONG magic;
int ref_count; LONG ref_count;
struct file_info config; struct file_info config;
struct file_info appdir; struct file_info appdir;
struct assembly *assemblies; struct assembly *assemblies;
......
...@@ -90,8 +90,8 @@ static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */ ...@@ -90,8 +90,8 @@ static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */ static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
static int free_lib_count; /* recursion depth of LdrUnloadDll calls */ static int free_lib_count; /* recursion depth of LdrUnloadDll calls */
static ULONG path_safe_mode; /* path mode set by RtlSetSearchPathMode */ static LONG path_safe_mode; /* path mode set by RtlSetSearchPathMode */
static ULONG dll_safe_mode = 1; /* dll search mode */ static LONG dll_safe_mode = 1; /* dll search mode */
static UNICODE_STRING dll_directory; /* extra path for LdrSetDllDirectory */ static UNICODE_STRING dll_directory; /* extra path for LdrSetDllDirectory */
static UNICODE_STRING system_dll_path; /* path to search for system dependency dlls */ static UNICODE_STRING system_dll_path; /* path to search for system dependency dlls */
static DWORD default_search_flags; /* default flags set by LdrSetDefaultDllDirectories */ static DWORD default_search_flags; /* default flags set by LdrSetDefaultDllDirectories */
...@@ -250,8 +250,8 @@ RTL_UNLOAD_EVENT_TRACE * WINAPI RtlGetUnloadEventTrace(void) ...@@ -250,8 +250,8 @@ RTL_UNLOAD_EVENT_TRACE * WINAPI RtlGetUnloadEventTrace(void)
*/ */
void WINAPI RtlGetUnloadEventTraceEx(ULONG **size, ULONG **count, void **trace) void WINAPI RtlGetUnloadEventTraceEx(ULONG **size, ULONG **count, void **trace)
{ {
static unsigned int element_size = sizeof(*unload_traces); static ULONG element_size = sizeof(*unload_traces);
static unsigned int element_count = ARRAY_SIZE(unload_traces); static ULONG element_count = ARRAY_SIZE(unload_traces);
*size = &element_size; *size = &element_size;
*count = &element_count; *count = &element_count;
...@@ -3334,7 +3334,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(RTL_PROCESS_MODULES *smi, ...@@ -3334,7 +3334,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(RTL_PROCESS_MODULES *smi,
} }
static NTSTATUS query_dword_option( HANDLE hkey, LPCWSTR name, ULONG *value ) static NTSTATUS query_dword_option( HANDLE hkey, LPCWSTR name, LONG *value )
{ {
NTSTATUS status; NTSTATUS status;
UNICODE_STRING str; UNICODE_STRING str;
...@@ -4369,7 +4369,7 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags ) ...@@ -4369,7 +4369,7 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags )
val = 0; val = 0;
break; break;
case BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT: case BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT:
InterlockedExchange( (int *)&path_safe_mode, 2 ); InterlockedExchange( &path_safe_mode, 2 );
return STATUS_SUCCESS; return STATUS_SUCCESS;
default: default:
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
...@@ -4377,9 +4377,9 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags ) ...@@ -4377,9 +4377,9 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags )
for (;;) for (;;)
{ {
int prev = path_safe_mode; LONG prev = path_safe_mode;
if (prev == 2) break; /* permanently set */ if (prev == 2) break; /* permanently set */
if (InterlockedCompareExchange( (int *)&path_safe_mode, val, prev ) == prev) return STATUS_SUCCESS; if (InterlockedCompareExchange( &path_safe_mode, val, prev ) == prev) return STATUS_SUCCESS;
} }
return STATUS_ACCESS_DENIED; return STATUS_ACCESS_DENIED;
} }
......
...@@ -182,12 +182,12 @@ static inline NTSTATUS wait_semaphore( RTL_CRITICAL_SECTION *crit, int timeout ) ...@@ -182,12 +182,12 @@ static inline NTSTATUS wait_semaphore( RTL_CRITICAL_SECTION *crit, int timeout )
} }
else else
{ {
int *lock = (int *)&crit->LockSemaphore; LONG *lock = (LONG *)&crit->LockSemaphore;
while (!InterlockedCompareExchange( lock, 0, 1 )) while (!InterlockedCompareExchange( lock, 0, 1 ))
{ {
static const int zero; static const LONG zero;
/* this may wait longer than specified in case of multiple wake-ups */ /* this may wait longer than specified in case of multiple wake-ups */
if (RtlWaitOnAddress( lock, &zero, sizeof(int), &time ) == STATUS_TIMEOUT) if (RtlWaitOnAddress( lock, &zero, sizeof(LONG), &time ) == STATUS_TIMEOUT)
return STATUS_TIMEOUT; return STATUS_TIMEOUT;
} }
return STATUS_WAIT_0; return STATUS_WAIT_0;
...@@ -363,7 +363,7 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit ) ...@@ -363,7 +363,7 @@ NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit )
} }
else else
{ {
int *lock = (int *)&crit->LockSemaphore; LONG *lock = (LONG *)&crit->LockSemaphore;
InterlockedExchange( lock, 1 ); InterlockedExchange( lock, 1 );
RtlWakeAddressSingle( lock ); RtlWakeAddressSingle( lock );
ret = STATUS_SUCCESS; ret = STATUS_SUCCESS;
...@@ -761,7 +761,7 @@ void WINAPI RtlInitializeConditionVariable( RTL_CONDITION_VARIABLE *variable ) ...@@ -761,7 +761,7 @@ void WINAPI RtlInitializeConditionVariable( RTL_CONDITION_VARIABLE *variable )
*/ */
void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable ) void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable )
{ {
InterlockedIncrement( (int *)&variable->Ptr ); InterlockedIncrement( (LONG *)&variable->Ptr );
RtlWakeAddressSingle( variable ); RtlWakeAddressSingle( variable );
} }
...@@ -772,7 +772,7 @@ void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable ) ...@@ -772,7 +772,7 @@ void WINAPI RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable )
*/ */
void WINAPI RtlWakeAllConditionVariable( RTL_CONDITION_VARIABLE *variable ) void WINAPI RtlWakeAllConditionVariable( RTL_CONDITION_VARIABLE *variable )
{ {
InterlockedIncrement( (int *)&variable->Ptr ); InterlockedIncrement( (LONG *)&variable->Ptr );
RtlWakeAddressAll( variable ); RtlWakeAddressAll( variable );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment