- Revert 32105 to make trunk bootable, as agreed with Colin.

svn path=/trunk/; revision=32108
This commit is contained in:
Aleksey Bragin 2008-02-03 21:47:35 +00:00
parent c7a1042e5c
commit 4c73dc576a
3 changed files with 26 additions and 5 deletions

View file

@ -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);

View file

@ -10,7 +10,28 @@
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
#include <host/typedefs.h>
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 {

View file

@ -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)