diff --git a/reactos/tools/rsym.c b/reactos/tools/rsym.c index ee865abbd49..38c0b7e3c95 100644 --- a/reactos/tools/rsym.c +++ b/reactos/tools/rsym.c @@ -490,7 +490,7 @@ ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs, *ProcessedRelocs = malloc(RelocSectionHeader->SizeOfRawData); if (NULL == *ProcessedRelocs) { - fprintf(stderr, "Failed to allocate %u bytes for relocations\n", (UINT)RelocSectionHeader->SizeOfRawData); + fprintf(stderr, "Failed to allocate %lu bytes for relocations\n", RelocSectionHeader->SizeOfRawData); return 1; } *ProcessedRelocsLength = 0; @@ -566,7 +566,7 @@ CreateOutputFile(FILE *OutFile, void *InData, OutHeader = malloc(StartOfRawData); if (NULL == OutHeader) { - fprintf(stderr, "Failed to allocate %u bytes for output file header\n", (UINT)StartOfRawData); + fprintf(stderr, "Failed to allocate %lu bytes for output file header\n", StartOfRawData); return 1; } memset(OutHeader, '\0', StartOfRawData); @@ -679,7 +679,7 @@ CreateOutputFile(FILE *OutFile, void *InData, PaddedRosSym = malloc(RosSymFileLength); if (NULL == PaddedRosSym) { - fprintf(stderr, "Failed to allocate %u bytes for padded .rossym\n", (UINT)RosSymFileLength); + fprintf(stderr, "Failed to allocate %lu bytes for padded .rossym\n", RosSymFileLength); return 1; } memcpy(PaddedRosSym, RosSymSection, RosSymLength); diff --git a/reactos/tools/rsym.h b/reactos/tools/rsym.h index f602ed1fd98..ae5dc39df44 100644 --- a/reactos/tools/rsym.h +++ b/reactos/tools/rsym.h @@ -10,7 +10,28 @@ #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 -#include +typedef unsigned char BYTE; +typedef unsigned char UCHAR; +typedef unsigned short WORD; +typedef unsigned short USHORT; +#if defined(__x86_64__) && defined(unix) +typedef signed int LONG; +typedef unsigned int ULONG; +typedef unsigned int DWORD; +#else +typedef signed long LONG; +typedef unsigned long ULONG; +typedef unsigned long DWORD; +#endif +#if defined(_WIN64) +typedef unsigned __int64 ULONG_PTR; +#else +#if defined(__x86_64__) && defined(unix) +typedef unsigned int ULONG_PTR; +#else +typedef unsigned long ULONG_PTR; +#endif +#endif #pragma pack(2) typedef struct _IMAGE_DOS_HEADER { diff --git a/reactos/tools/rsym.mak b/reactos/tools/rsym.mak index 972ee9f5377..c87c61cd8a1 100644 --- a/reactos/tools/rsym.mak +++ b/reactos/tools/rsym.mak @@ -16,7 +16,7 @@ RSYM_SOURCES = \ RSYM_OBJECTS = \ $(addprefix $(INTERMEDIATE_), $(RSYM_SOURCES:.c=.o)) -RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS) -Iinclude +RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS) RSYM_HOST_LFLAGS = $(TOOLS_LFLAGS)