[LOG2LINES] Compile the tool for MSVC builds

This commit is contained in:
Mark Jansen 2022-10-24 21:56:54 +02:00
parent 24d124f99f
commit a09d5bae0f
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
8 changed files with 30 additions and 14 deletions

View file

@ -147,9 +147,7 @@ if(NOT CMAKE_CROSSCOMPILING)
endif()
add_subdirectory(sdk/include/host)
if(NOT MSVC)
add_subdirectory(dll/win32/dbghelp)
endif()
add_subdirectory(dll/win32/dbghelp)
add_subdirectory(sdk/tools)
add_subdirectory(sdk/lib)

View file

@ -1,6 +1,6 @@
if(NOT CMAKE_CROSSCOMPILING)
add_definitions(-DDBGHELP_STATIC_LIB)
add_definitions(-DDBGHELP_STATIC_LIB -DNONAMELESSUNION)
include_directories(
${REACTOS_SOURCE_DIR}/tools)

View file

@ -32,6 +32,10 @@
#include "winternl.h"
#include "wine/debug.h"
#include "wine/heap.h"
#else
#ifdef _MSC_VER
#define strcasecmp _stricmp
#endif
#endif
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);

View file

@ -34,8 +34,10 @@ add_subdirectory(hhpcomp)
add_subdirectory(hpp)
add_subdirectory(isohybrid)
add_subdirectory(kbdtool)
add_subdirectory(log2lines)
add_subdirectory(mkhive)
add_subdirectory(mkisofs)
add_subdirectory(rsym)
add_subdirectory(txt2nls)
add_subdirectory(unicode)
add_subdirectory(widl)
@ -47,12 +49,9 @@ if ((ARCH STREQUAL "amd64") AND (TARGET_COMPILER_ID STREQUAL "GNU"))
endif()
if(NOT MSVC)
add_subdirectory(log2lines)
add_subdirectory(rsym)
add_host_tool(pefixup pefixup.c)
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
endif()
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
endif()
target_link_libraries(pefixup PRIVATE host_includes)
endif()

View file

@ -9,8 +9,12 @@ list(APPEND SOURCE
match.c
options.c
stat.c
util.c)
util.c
../port/getopt.c)
include_directories(${REACTOS_SOURCE_DIR}/sdk/tools/rsym)
if(MSVC)
include_directories(../port)
endif()
add_host_tool(log2lines ${SOURCE})
target_link_libraries(log2lines PRIVATE host_includes rsym_common)

View file

@ -2,6 +2,10 @@
#if defined(_WIN32)
#ifdef _MSC_VER
#define strcasecmp _stricmp
#endif
#include <direct.h>
#define POPEN _popen
@ -31,4 +35,8 @@
#endif /* not defined (_WIN32) */
#ifndef PATH_MAX
#define PATH_MAX 260
#endif
/* EOF */

View file

@ -13,6 +13,7 @@
#include "util.h"
#include "options.h"
#include "log2lines.h"
#include <sys/types.h>
static PIMAGE_SECTION_HEADER
find_rossym_section(PIMAGE_FILE_HEADER PEFileHeader, PIMAGE_SECTION_HEADER PESectionHeaders)

View file

@ -26,7 +26,7 @@ typedef struct {
USHORT s_nlnno; /* number of line number entries */
ULONG s_flags; /* flags */
} SCNHDR;
#pragma pack(4)
#pragma pack(push, 4)
typedef struct _SYMBOLFILE_HEADER {
ULONG SymbolsOffset;
@ -135,7 +135,7 @@ typedef struct _STAB_ENTRY {
#define C_ALIAS 105 /* duplicate tag */
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
#pragma pack(1)
#pragma pack(push, 1)
typedef struct _COFF_SYMENT
{
union
@ -155,7 +155,7 @@ typedef struct _COFF_SYMENT
UCHAR e_sclass;
UCHAR e_numaux;
} COFF_SYMENT, *PCOFF_SYMENT;
#pragma pack(4)
#pragma pack(pop)
#ifdef TARGET_i386
typedef ULONG TARGET_ULONG_PTR;
@ -170,6 +170,8 @@ typedef struct _ROSSYM_ENTRY {
ULONG SourceLine;
} ROSSYM_ENTRY, *PROSSYM_ENTRY;
#pragma pack(pop)
#define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1))
extern char*