if (fout)
{
- fprintf(fout, "%"PRIu64"\n", start_time);
+ fprintf(fout, "%"PRIu64"\n", (long unsigned int) start_time);
fclose(fout);
}
if (fin)
{
UINT64 AStartTime = 0;
- fscanf(fin, "%"PRIu64, &AStartTime);
+ fscanf(fin, "%"PRIu64, (long unsigned int*) &AStartTime);
fclose(fin);
if (start_time > AStartTime)
{
if (fin)
{
UINT64 VStartTime = 0;
- fscanf(fin, "%"PRIu64, &VStartTime);
+ fscanf(fin, "%"PRIu64, (long unsigned int*) &VStartTime);
fclose(fin);
if (start_time > VStartTime)
{
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_STANDARD);
printf("\nKeyboard Layouts\n");
for (i = 0; layouts[i].code; i++)
- printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name);
+ printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_VARIANT);
printf("\nKeyboard Layout Variants\n");
for (i = 0; layouts[i].code; i++)
- printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name);
+ printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_IME);
printf("\nKeyboard Input Method Editors (IMEs)\n");
for (i = 0; layouts[i].code; i++)
- printf("0x%08lX\t%s\n", layouts[i].code, layouts[i].name);
+ printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
printf("\n");
if (file->UseMultiMon != 0)
{
- printf("UseMultiMon mismatch: Actual: %ld, Expected: %d\n", file->UseMultiMon, 0);
+ printf("UseMultiMon mismatch: Actual: %d, Expected: %d\n", file->UseMultiMon, 0);
return -1;
}
if (file->ScreenModeId != 2)
{
- printf("ScreenModeId mismatch: Actual: %ld, Expected: %d\n", file->ScreenModeId, 2);
+ printf("ScreenModeId mismatch: Actual: %d, Expected: %d\n", file->ScreenModeId, 2);
return -1;
}
if (file->GatewayProfileUsageMethod != 1)
{
- printf("GatewayProfileUsageMethod mismatch: Actual: %ld, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
+ printf("GatewayProfileUsageMethod mismatch: Actual: %d, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
return -1;
}
if (file->UseMultiMon != 0)
{
- printf("UseMultiMon mismatch: Actual: %ld, Expected: %d\n", file->UseMultiMon, 0);
+ printf("UseMultiMon mismatch: Actual: %d, Expected: %d\n", file->UseMultiMon, 0);
return -1;
}
if (file->ScreenModeId != 2)
{
- printf("ScreenModeId mismatch: Actual: %ld, Expected: %d\n", file->ScreenModeId, 2);
+ printf("ScreenModeId mismatch: Actual: %d, Expected: %d\n", file->ScreenModeId, 2);
return -1;
}
if (file->GatewayProfileUsageMethod != 1)
{
- printf("GatewayProfileUsageMethod mismatch: Actual: %ld, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
+ printf("GatewayProfileUsageMethod mismatch: Actual: %d, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
return -1;
}
if (dstSizes[1] != sizeof(TEST_64X64_RED_PLANE_RLE))
{
printf("RedPlaneRle unexpected size: actual: %d, expected: %d\n",
- dstSizes[1], sizeof(TEST_64X64_RED_PLANE_RLE));
+ dstSizes[1], (int) sizeof(TEST_64X64_RED_PLANE_RLE));
//return -1;
}
{
printf("RedPlaneRle doesn't match expected output\n");
- printf("RedPlaneRle Expected (%d):\n", sizeof(TEST_64X64_RED_PLANE_RLE));
+ printf("RedPlaneRle Expected (%d):\n", (int) sizeof(TEST_64X64_RED_PLANE_RLE));
//winpr_HexDump((BYTE*) TEST_64X64_RED_PLANE_RLE, sizeof(TEST_64X64_RED_PLANE_RLE));
printf("RedPlaneRle Actual (%d):\n", dstSizes[1]);
if (dstSizes[2] != sizeof(TEST_64X64_GREEN_PLANE_RLE))
{
printf("GreenPlaneRle unexpected size: actual: %d, expected: %d\n",
- dstSizes[1], sizeof(TEST_64X64_GREEN_PLANE_RLE));
+ dstSizes[1], (int) sizeof(TEST_64X64_GREEN_PLANE_RLE));
return -1;
}
{
printf("GreenPlaneRle doesn't match expected output\n");
- printf("GreenPlaneRle Expected (%d):\n", sizeof(TEST_64X64_GREEN_PLANE_RLE));
- winpr_HexDump((BYTE*) TEST_64X64_GREEN_PLANE_RLE, sizeof(TEST_64X64_GREEN_PLANE_RLE));
+ printf("GreenPlaneRle Expected (%d):\n", (int) sizeof(TEST_64X64_GREEN_PLANE_RLE));
+ winpr_HexDump((BYTE*) TEST_64X64_GREEN_PLANE_RLE, (int) sizeof(TEST_64X64_GREEN_PLANE_RLE));
printf("GreenPlaneRle Actual (%d):\n", dstSizes[2]);
winpr_HexDump(planar->rlePlanes[2], dstSizes[2]);
if (dstSizes[3] != sizeof(TEST_64X64_BLUE_PLANE_RLE))
{
printf("BluePlaneRle unexpected size: actual: %d, expected: %d\n",
- dstSizes[1], sizeof(TEST_64X64_BLUE_PLANE_RLE));
+ dstSizes[1], (int) sizeof(TEST_64X64_BLUE_PLANE_RLE));
return -1;
}
{
printf("BluePlaneRle doesn't match expected output\n");
- printf("BluePlaneRle Expected (%d):\n", sizeof(TEST_64X64_BLUE_PLANE_RLE));
- winpr_HexDump((BYTE*) TEST_64X64_BLUE_PLANE_RLE, sizeof(TEST_64X64_BLUE_PLANE_RLE));
+ printf("BluePlaneRle Expected (%d):\n", (int) sizeof(TEST_64X64_BLUE_PLANE_RLE));
+ winpr_HexDump((BYTE*) TEST_64X64_BLUE_PLANE_RLE, (int) sizeof(TEST_64X64_BLUE_PLANE_RLE));
printf("BluePlaneRle Actual (%d):\n", dstSizes[3]);
winpr_HexDump(planar->rlePlanes[3], dstSizes[3]);
typedef struct _RPC_MESSAGE
{
RPC_BINDING_HANDLE Handle;
- unsigned long DataRepresentation;
+ ULONG DataRepresentation;
void* Buffer;
unsigned int BufferLength;
unsigned int ProcNum;
void* ReservedForRuntime;
RPC_MGR_EPV* ManagerEpv;
void* ImportContext;
- unsigned long RpcFlags;
+ ULONG RpcFlags;
} RPC_MESSAGE, *PRPC_MESSAGE;
typedef void (*RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
unsigned char* BufferStart;
unsigned char* BufferEnd;
unsigned char* BufferMark;
- unsigned long BufferLength;
- unsigned long MemorySize;
+ ULONG BufferLength;
+ ULONG MemorySize;
unsigned char* Memory;
int IsClient;
int ReuseBuffer;
unsigned char uFlags;
unsigned short Unused2;
ULONG_PTR MaxCount;
- unsigned long Offset;
- unsigned long ActualCount;
+ ULONG Offset;
+ ULONG ActualCount;
void *(*pfnAllocate)(size_t);
void (*pfnFree)(void*);
unsigned char* StackTop;
handle_t SavedHandle;
const struct _MIDL_STUB_DESC* StubDesc;
struct _FULL_PTR_XLAT_TABLES* FullPtrXlatTables;
- unsigned long FullPtrRefId;
- unsigned long PointerLength;
+ ULONG FullPtrRefId;
+ ULONG PointerLength;
int fInDontFree : 1;
int fDontCallFreeInst : 1;
int fInOnlyParam : 1;
int fHasNewCorrDesc : 1;
int fUnused : 10;
int fUnused2 : 16;
- unsigned long dwDestContext;
+ ULONG dwDestContext;
void* pvDestContext;
//NDR_SCONTEXT* SavedContextHandles;
long ParamNumber;
struct IRpcChannelBuffer* pRpcChannelBuffer;
//PARRAY_INFO pArrayInfo;
- unsigned long* SizePtrCountArray;
- unsigned long* SizePtrOffsetArray;
- unsigned long* SizePtrLengthArray;
+ ULONG* SizePtrCountArray;
+ ULONG* SizePtrOffsetArray;
+ ULONG* SizePtrLengthArray;
void* pArgQueue;
- unsigned long dwStubPhase;
+ ULONG dwStubPhase;
void* LowStackMark;
//PNDR_ASYNC_MESSAGE pAsyncMsg;
//PNDR_CORRELATION_INFO pCorrInfo;
XMIT_HELPER_ROUTINE pfnFreeInst;
} XMIT_ROUTINE_QUINTUPLE, *PXMIT_ROUTINE_QUINTUPLE;
-typedef unsigned long (*USER_MARSHAL_SIZING_ROUTINE)(unsigned long*, unsigned long, void*);
-typedef unsigned char* (*USER_MARSHAL_MARSHALLING_ROUTINE)(unsigned long*, unsigned char*, void*);
-typedef unsigned char* (*USER_MARSHAL_UNMARSHALLING_ROUTINE)(unsigned long*, unsigned char*, void*);
-typedef void (*USER_MARSHAL_FREEING_ROUTINE)(unsigned long*, void*);
+typedef ULONG (*USER_MARSHAL_SIZING_ROUTINE)(ULONG*, ULONG, void*);
+typedef unsigned char* (*USER_MARSHAL_MARSHALLING_ROUTINE)(ULONG*, unsigned char*, void*);
+typedef unsigned char* (*USER_MARSHAL_UNMARSHALLING_ROUTINE)(ULONG*, unsigned char*, void*);
+typedef void (*USER_MARSHAL_FREEING_ROUTINE)(ULONG*, void*);
typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
{
const unsigned char* pFormatTypes;
int fCheckBounds;
- unsigned long Version;
+ ULONG Version;
MALLOC_FREE_STRUCT* pMallocFreeStruct;
long MIDLVersion;
if (status != NO_ERROR)
{
- printf("CredUIPromptForCredentials unexpected status: 0x%08lX\n", status);
+ printf("CredUIPromptForCredentials unexpected status: 0x%08X\n", status);
return -1;
}
status = CredUIParseUserName(testUserName1, User, sizeof(User) / sizeof(TCHAR),
Domain, sizeof(Domain) / sizeof(TCHAR));
- printf("CredUIParseUserName status: 0x%08lX\n", status);
+ printf("CredUIParseUserName status: 0x%08X\n", status);
_tprintf(_T("UserName: %s -> Domain: %s User: %s\n"), testUserName1, Domain, User);
status = CredUIParseUserName(testUserName2, User, sizeof(User) / sizeof(TCHAR),
Domain, sizeof(Domain) / sizeof(TCHAR));
- printf("CredUIParseUserName status: 0x%08lX\n", status);
+ printf("CredUIParseUserName status: 0x%08X\n", status);
_tprintf(_T("UserName: %s -> Domain: %s User: %s\n"), testUserName2, Domain, User);
if (status != NO_ERROR)
{
- printf("CredUIPromptForCredentials unexpected status: 0x%08lX\n", status);
+ printf("CredUIPromptForCredentials unexpected status: 0x%08X\n", status);
return -1;
}
if (!length)
{
DWORD error = GetLastError();
- printf("MultiByteToWideChar error: 0x%08lX\n", error);
+ printf("MultiByteToWideChar error: 0x%08X\n", error);
return -1;
}
if (!length)
{
DWORD error = GetLastError();
- printf("WideCharToMultiByte error: 0x%08lX\n", error);
+ printf("WideCharToMultiByte error: 0x%08X\n", error);
return -1;
}
if (SpnLength != 37)
{
- _tprintf(_T("DsMakeSpn: SpnLength mismatch: Actual: %ld, Expected: %d\n"), SpnLength, 37);
+ _tprintf(_T("DsMakeSpn: SpnLength mismatch: Actual: %d, Expected: %d\n"), SpnLength, 37);
return -1;
}
return -1;
}
- printf("Completed %lu iterations.\n", *pLoopCount);
+ printf("Completed %d iterations.\n", *pLoopCount);
return status;
}
if (status != S_OK)
{
- _tprintf(_T("PathAllocCombine status: 0x%08lX\n"), status);
+ _tprintf(_T("PathAllocCombine status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathAllocCombine status: 0x%08lX\n"), status);
+ _tprintf(_T("PathAllocCombine status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathAllocCombine status: 0x%08lX\n"), status);
+ _tprintf(_T("PathAllocCombine status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathAllocCombine status: 0x%08lX\n"), status);
+ _tprintf(_T("PathAllocCombine status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAddBackslash status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), status);
return -1;
}
if (status != S_FALSE)
{
- _tprintf(_T("PathCchAddBackslash status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddBackslash status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAddExtension status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddExtension status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAddExtension status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddExtension status: 0x%08X\n"), status);
return -1;
}
if (status != S_FALSE)
{
- _tprintf(_T("PathCchAddExtension status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddExtension status: 0x%08X\n"), status);
return -1;
}
if (status != S_FALSE)
{
- _tprintf(_T("PathCchAddExtension status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAddExtension status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAppend status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAppend status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAppend status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAppend status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAppend status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAppend status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchAppend status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchAppend status: 0x%08X\n"), status);
return -1;
}
if (status != S_OK)
{
- _tprintf(_T("PathCchStripPrefix status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchStripPrefix status: 0x%08X\n"), status);
return -1;
}
if (status != S_FALSE)
{
- _tprintf(_T("PathCchStripPrefix status: 0x%08lX\n"), status);
+ _tprintf(_T("PathCchStripPrefix status: 0x%08X\n"), status);
return -1;
}
if (dwWrite != sizeof(writeBuffer))
{
- _tprintf(_T("WriteFile: unexpected number of bytes written: Actual: %ld, Expected: %ld\n"),
- dwWrite, (long int)sizeof(writeBuffer));
+ _tprintf(_T("WriteFile: unexpected number of bytes written: Actual: %d, Expected: %d\n"),
+ dwWrite, (int) sizeof(writeBuffer));
return -1;
}
if (dwRead != sizeof(readBuffer))
{
- _tprintf(_T("ReadFile: unexpected number of bytes read: Actual: %ld, Expected: %ld\n"),
- dwWrite, (long int)sizeof(readBuffer));
+ _tprintf(_T("ReadFile: unexpected number of bytes read: Actual: %d, Expected: %d\n"),
+ dwWrite, (int) sizeof(readBuffer));
return -1;
}
BYTE b[1024];
BYTE c[1024];
- printf("Hello %s: %ld (thread: %lu)\n", (char *)context,
+ printf("Hello %s: %d (thread: %d)\n", (char*) context,
InterlockedIncrement(&count), GetCurrentThreadId());
for (index = 0; index < 100; index++)
if (value->type == REG_DWORD)
{
- fprintf(stderr, "dword:%08lX\n", value->data.dword);
+ fprintf(stderr, "dword:%08X\n", value->data.dword);
}
else if (value->type == REG_SZ)
{
#include "ndr_private.h"
-void NdrpAlignLength(unsigned long* length, unsigned int alignment)
+void NdrpAlignLength(ULONG* length, unsigned int alignment)
{
*length = (*length + alignment - 1) & ~(alignment - 1);
}
-void NdrpIncrementLength(unsigned long* length, unsigned int size)
+void NdrpIncrementLength(ULONG* length, unsigned int size)
{
*length += size;
}
#ifndef _WIN32
-void NdrpAlignLength(unsigned long* length, unsigned int alignment);
-void NdrpIncrementLength(unsigned long* length, unsigned int size);
+void NdrpAlignLength(ULONG* length, unsigned int alignment);
+void NdrpIncrementLength(ULONG* length, unsigned int size);
extern const NDR_TYPE_SIZE_ROUTINE pfnSizeRoutines[];
extern const NDR_TYPE_MARSHALL_ROUTINE pfnMarshallRoutines[];
return -1;
}
- printf("cBuffers: %ld ulVersion: %ld\n", output_SecBuffer_desc.cBuffers, output_SecBuffer_desc.ulVersion);
+ printf("cBuffers: %d ulVersion: %d\n", output_SecBuffer_desc.cBuffers, output_SecBuffer_desc.ulVersion);
p_SecBuffer = &output_SecBuffer_desc.pBuffers[0];
- printf("BufferType: 0x%04lX cbBuffer:%ld\n", p_SecBuffer->BufferType, p_SecBuffer->cbBuffer);
+ printf("BufferType: 0x%04X cbBuffer: %d\n", p_SecBuffer->BufferType, p_SecBuffer->cbBuffer);
table->FreeCredentialsHandle(&credentials);
if (InterlockedCompareExchange(&lpCriticalSection->LockCount, 0, -1) == -1)
{
lpCriticalSection->RecursionCount = 1;
- lpCriticalSection->OwningThread = (HANDLE)GetCurrentThreadId();
+ lpCriticalSection->OwningThread = (HANDLE) (ULONG_PTR) GetCurrentThreadId();
return;
}
/* Failed to get the lock. Let the scheduler know that we're spinning. */
if (InterlockedIncrement(&lpCriticalSection->LockCount))
{
/* Section is already locked. Check if it is owned by the current thread. */
- if (lpCriticalSection->OwningThread == (HANDLE)GetCurrentThreadId())
+ if (lpCriticalSection->OwningThread == (HANDLE) (ULONG_PTR) GetCurrentThreadId())
{
/* Recursion. No need to wait. */
lpCriticalSection->RecursionCount++;
}
/* We got the lock. Own it ... */
lpCriticalSection->RecursionCount = 1;
- lpCriticalSection->OwningThread = (HANDLE)GetCurrentThreadId();
+ lpCriticalSection->OwningThread = (HANDLE) (ULONG_PTR) GetCurrentThreadId();
}
BOOL TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
{
- HANDLE current_thread = (HANDLE)GetCurrentThreadId();
+ HANDLE current_thread = (HANDLE) (ULONG_PTR) GetCurrentThreadId();
/* Atomically acquire the the lock if the section is free. */
if (InterlockedCompareExchange(&lpCriticalSection->LockCount, 0, -1 ) == -1)
static PVOID TestSynchCritical_Test1(PVOID arg)
{
int i, j, rc;
- HANDLE hThread = (HANDLE)GetCurrentThreadId();
+ HANDLE hThread = (HANDLE) (ULONG_PTR) GetCurrentThreadId();
PBOOL pbContinueRunning = (PBOOL)arg;
GetNativeSystemInfo(&sysinfo);
- hMainThread = (HANDLE)GetCurrentThreadId();
+ hMainThread = (HANDLE) (ULONG_PTR) GetCurrentThreadId();
/**
* Test SpinCount in SetCriticalSectionSpinCount, InitializeCriticalSectionEx and InitializeCriticalSectionAndSpinCount
#endif
if (dwPreviousSpinCount != dwSpinCountExpected)
{
- printf("CriticalSection failure: SetCriticalSectionSpinCount returned %lu (expected: %lu)\n", dwPreviousSpinCount, dwSpinCountExpected);
+ printf("CriticalSection failure: SetCriticalSectionSpinCount returned %u (expected: %u)\n", dwPreviousSpinCount, dwSpinCountExpected);
goto fail;
}
{
if (critical.RecursionCount != i)
{
- printf("CriticalSection failure: RecursionCount field is %ld instead of %d.\n", critical.RecursionCount, i);
+ printf("CriticalSection failure: RecursionCount field is %d instead of %d.\n", critical.RecursionCount, i);
goto fail;
}
if (i%2==0)
LeaveCriticalSection(&critical);
if (critical.RecursionCount != i)
{
- printf("CriticalSection failure: RecursionCount field is %ld instead of %d.\n", critical.RecursionCount, i);
+ printf("CriticalSection failure: RecursionCount field is %d instead of %d.\n", critical.RecursionCount, i);
goto fail;
}
if (critical.OwningThread != (HANDLE)(i ? hMainThread : NULL))
GetExitCodeThread(hThreads[i], &dwThreadExitCode);
if(dwThreadExitCode != 0)
{
- printf("CriticalSection failure: Thread #%d returned error code %lu\n", i, dwThreadExitCode);
+ printf("CriticalSection failure: Thread #%d returned error code %u\n", i, dwThreadExitCode);
goto fail;
}
CloseHandle(hThreads[i]);
if (gTestValueVulnerable != gTestValueSerialized)
{
- printf("CriticalSection failure: unexpected test value %ld (expected %ld)\n", gTestValueVulnerable, gTestValueSerialized);
+ printf("CriticalSection failure: unexpected test value %d (expected %d)\n", gTestValueVulnerable, gTestValueSerialized);
goto fail;
}
GetExitCodeThread(hThread, &dwThreadExitCode);
if(dwThreadExitCode != 0)
{
- printf("CriticalSection failure: Thread returned error code %lu\n", dwThreadExitCode);
+ printf("CriticalSection failure: Thread returned error code %u\n", dwThreadExitCode);
goto fail;
}
CloseHandle(hThread);
dwDeadLockDetectionTimeMs = 2 * TEST_SYNC_CRITICAL_TEST1_RUNTIME_MS * TEST_SYNC_CRITICAL_TEST1_RUNS;
- printf("Deadlock will be assumed after %lu ms.\n", dwDeadLockDetectionTimeMs);
+ printf("Deadlock will be assumed after %u ms.\n", dwDeadLockDetectionTimeMs);
hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) TestSynchCritical_Main, &bThreadTerminated, 0, NULL);
}
else
{
- fprintf(stderr, "WaitForSingleObject: unknown handle type %lu\n", Type);
+ fprintf(stderr, "WaitForSingleObject: unknown handle type %d\n", Type);
}
return WAIT_OBJECT_0;
}
else
{
- fprintf(stderr, "WaitForMultipleObjects: unknown handle type %lu\n", Type);
+ fprintf(stderr, "WaitForMultipleObjects: unknown handle type %d\n", Type);
return WAIT_FAILED;
}
printf("SystemInfo:\n");
printf("\twProcessorArchitecture: %d\n", sysinfo.wProcessorArchitecture);
printf("\twReserved: %d\n", sysinfo.wReserved);
- printf("\tdwPageSize: 0x%08lX\n", sysinfo.dwPageSize);
+ printf("\tdwPageSize: 0x%08X\n", sysinfo.dwPageSize);
printf("\tlpMinimumApplicationAddress: %p\n", sysinfo.lpMinimumApplicationAddress);
printf("\tlpMaximumApplicationAddress: %p\n", sysinfo.lpMaximumApplicationAddress);
- printf("\tdwActiveProcessorMask: 0x%08llX\n", (unsigned long long)sysinfo.dwActiveProcessorMask);
- printf("\tdwNumberOfProcessors: %ld\n", sysinfo.dwNumberOfProcessors);
- printf("\tdwProcessorType: %ld\n", sysinfo.dwProcessorType);
- printf("\tdwAllocationGranularity: %ld\n", sysinfo.dwAllocationGranularity);
+ printf("\tdwActiveProcessorMask: 0x%08X\n", (unsigned int) sysinfo.dwActiveProcessorMask);
+ printf("\tdwNumberOfProcessors: %d\n", sysinfo.dwNumberOfProcessors);
+ printf("\tdwProcessorType: %d\n", sysinfo.dwProcessorType);
+ printf("\tdwAllocationGranularity: %d\n", sysinfo.dwAllocationGranularity);
printf("\twProcessorLevel: %d\n", sysinfo.wProcessorLevel);
printf("\twProcessorRevision: %d\n", sysinfo.wProcessorRevision);
printf("\n");
if (strcmp(value, val1) != 0)
{
- printf("HashTable_GetItemValue: Expected : %d, Actual: %d\n", val1, value);
+ printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val1, value);
return -1;
}
if (strcmp(value, val2) != 0)
{
- printf("HashTable_GetItemValue: Expected : %d, Actual: %d\n", val2, value);
+ printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val2, value);
return -1;
}
if (strcmp(value, val3) != 0)
{
- printf("HashTable_GetItemValue: Expected : %d, Actual: %d\n", val3, value);
+ printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val3, value);
return -1;
}
if (strcmp(value, "apple") != 0)
{
- printf("HashTable_GetItemValue: Expected : %d, Actual: %d\n", "apple", value);
+ printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", "apple", value);
return -1;
}
if (strcmp(value, val1) != 0)
{
- printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n", val1, value);
+ printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n",
+ (int) (size_t) val1, (int) (size_t) value);
return -1;
}
if (strcmp(value, val2) != 0)
{
- printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n", val2, value);
+ printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n",
+ (int) (size_t) val2, (int) (size_t) value);
return -1;
}
if (strcmp(value, val3) != 0)
{
- printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n", val3, value);
+ printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n",
+ (int) (size_t) val3, (int) (size_t) value);
return -1;
}
if (strcmp(value, "apple") != 0)
{
- printf("ListDictionary_GetItemValue: Expected : %d, Actual: %d\n", "apple", value);
+ printf("ListDictionary_GetItemValue: Expected : %s, Actual: %s\n", "apple", value);
return -1;
}
value = ListDictionary_Remove_Head(list);
if (value)
{
- printf("ListDictionary_Remove_Head: Expected : (null), Actual: %s Count: %d\n", value);
+ printf("ListDictionary_Remove_Head: Expected : (null), Actual: %s\n", value);
return -1;
}
}
else if ((*p == 'l') && (*(p + 1) == 'n')) /* line number */
{
- args[argc++] = (void*) message->LineNumber;
+ args[argc++] = (void*) (size_t) message->LineNumber;
format[index++] = '%';
format[index++] = 'd';
p++;