Author: akhaldi
Date: Sat May 16 10:24:11 2015
New Revision: 67765
URL:
http://svn.reactos.org/svn/reactos?rev=67765&view=rev
Log:
[IMAGEHLP_WINETEST] Add to and fix MSVC build. By Mark Jansen.
Modified:
trunk/rostests/winetests/CMakeLists.txt
trunk/rostests/winetests/imagehlp/image.c
Modified: trunk/rostests/winetests/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
==============================================================================
--- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Sat May 16 10:24:11 2015
@@ -32,9 +32,7 @@
add_subdirectory(gdiplus)
add_subdirectory(hlink)
add_subdirectory(icmp)
-if(NOT MSVC)
- add_subdirectory(imagehlp) # FIXME: msvc build.
-endif()
+add_subdirectory(imagehlp)
add_subdirectory(imm32)
add_subdirectory(inetcomm)
add_subdirectory(inetmib1)
Modified: trunk/rostests/winetests/imagehlp/image.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/imagehlp/image.…
==============================================================================
--- trunk/rostests/winetests/imagehlp/image.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/imagehlp/image.c [iso-8859-1] Sat May 16 10:24:11 2015
@@ -56,7 +56,7 @@
} ibn;
char dllname[0x10];
};
-#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks[0]))
+#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks))
static struct _PeImage {
IMAGE_DOS_HEADER dos_header;
@@ -70,9 +70,9 @@
char __alignment3[FILE_TOTAL-FILE_IDATA-sizeof(struct Imports)];
} bin = {
/* dos header */
- {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, 0, 0, {},
FILE_PE_START},
+ {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}, 0, 0, {0},
FILE_PE_START},
/* alignment before PE header */
- {},
+ {0},
/* nt headers */
{IMAGE_NT_SIGNATURE,
/* basic headers - 3 sections, no symbols, EXE file */
@@ -99,7 +99,7 @@
0, 0, 0, IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ |
IMAGE_SCN_MEM_WRITE}
},
/* alignment before first section */
- {},
+ {0},
/* .text section */
{
0x31, 0xC0, /* xor eax, eax */
@@ -122,7 +122,7 @@
"KERNEL32.DLL"
},
/* final alignment */
- {}
+ {0}
};
#include <poppack.h>
@@ -222,7 +222,8 @@
{FILE_IDATA-FILE_TEXT, &bin.text_section},
{sizeof(bin.idata_section.descriptors[0].u.OriginalFirstThunk),
&bin.idata_section.descriptors[0].u.OriginalFirstThunk},
- {FIELD_OFFSET(struct Imports, thunks)-FIELD_OFFSET(struct Imports,
descriptors[0].Name),
+ {FIELD_OFFSET(struct Imports, thunks)-
+ (FIELD_OFFSET(struct Imports, descriptors)+FIELD_OFFSET(IMAGE_IMPORT_DESCRIPTOR,
Name)),
&bin.idata_section.descriptors[0].Name},
{FILE_TOTAL-FILE_IDATA-FIELD_OFFSET(struct Imports, ibn),
&bin.idata_section.ibn}