mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[LOG2LINES] Compile the tool for MSVC builds
This commit is contained in:
parent
24d124f99f
commit
a09d5bae0f
8 changed files with 30 additions and 14 deletions
|
@ -147,9 +147,7 @@ if(NOT CMAKE_CROSSCOMPILING)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(sdk/include/host)
|
add_subdirectory(sdk/include/host)
|
||||||
|
|
||||||
if(NOT MSVC)
|
add_subdirectory(dll/win32/dbghelp)
|
||||||
add_subdirectory(dll/win32/dbghelp)
|
|
||||||
endif()
|
|
||||||
add_subdirectory(sdk/tools)
|
add_subdirectory(sdk/tools)
|
||||||
add_subdirectory(sdk/lib)
|
add_subdirectory(sdk/lib)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
add_definitions(-DDBGHELP_STATIC_LIB)
|
add_definitions(-DDBGHELP_STATIC_LIB -DNONAMELESSUNION)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${REACTOS_SOURCE_DIR}/tools)
|
${REACTOS_SOURCE_DIR}/tools)
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
|
#else
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define strcasecmp _stricmp
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
|
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
|
||||||
|
|
|
@ -34,8 +34,10 @@ add_subdirectory(hhpcomp)
|
||||||
add_subdirectory(hpp)
|
add_subdirectory(hpp)
|
||||||
add_subdirectory(isohybrid)
|
add_subdirectory(isohybrid)
|
||||||
add_subdirectory(kbdtool)
|
add_subdirectory(kbdtool)
|
||||||
|
add_subdirectory(log2lines)
|
||||||
add_subdirectory(mkhive)
|
add_subdirectory(mkhive)
|
||||||
add_subdirectory(mkisofs)
|
add_subdirectory(mkisofs)
|
||||||
|
add_subdirectory(rsym)
|
||||||
add_subdirectory(txt2nls)
|
add_subdirectory(txt2nls)
|
||||||
add_subdirectory(unicode)
|
add_subdirectory(unicode)
|
||||||
add_subdirectory(widl)
|
add_subdirectory(widl)
|
||||||
|
@ -47,12 +49,9 @@ if ((ARCH STREQUAL "amd64") AND (TARGET_COMPILER_ID STREQUAL "GNU"))
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_subdirectory(log2lines)
|
|
||||||
add_subdirectory(rsym)
|
|
||||||
|
|
||||||
add_host_tool(pefixup pefixup.c)
|
add_host_tool(pefixup pefixup.c)
|
||||||
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
|
if (ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64")
|
||||||
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
|
target_compile_definitions(pefixup PRIVATE _TARGET_PE64)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(pefixup PRIVATE host_includes)
|
target_link_libraries(pefixup PRIVATE host_includes)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -9,8 +9,12 @@ list(APPEND SOURCE
|
||||||
match.c
|
match.c
|
||||||
options.c
|
options.c
|
||||||
stat.c
|
stat.c
|
||||||
util.c)
|
util.c
|
||||||
|
../port/getopt.c)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/sdk/tools/rsym)
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/tools/rsym)
|
||||||
|
if(MSVC)
|
||||||
|
include_directories(../port)
|
||||||
|
endif()
|
||||||
add_host_tool(log2lines ${SOURCE})
|
add_host_tool(log2lines ${SOURCE})
|
||||||
target_link_libraries(log2lines PRIVATE host_includes rsym_common)
|
target_link_libraries(log2lines PRIVATE host_includes rsym_common)
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define strcasecmp _stricmp
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
#define POPEN _popen
|
#define POPEN _popen
|
||||||
|
@ -31,4 +35,8 @@
|
||||||
|
|
||||||
#endif /* not defined (_WIN32) */
|
#endif /* not defined (_WIN32) */
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 260
|
||||||
|
#endif
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "log2lines.h"
|
#include "log2lines.h"
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
static PIMAGE_SECTION_HEADER
|
static PIMAGE_SECTION_HEADER
|
||||||
find_rossym_section(PIMAGE_FILE_HEADER PEFileHeader, PIMAGE_SECTION_HEADER PESectionHeaders)
|
find_rossym_section(PIMAGE_FILE_HEADER PEFileHeader, PIMAGE_SECTION_HEADER PESectionHeaders)
|
||||||
|
|
|
@ -26,7 +26,7 @@ typedef struct {
|
||||||
USHORT s_nlnno; /* number of line number entries */
|
USHORT s_nlnno; /* number of line number entries */
|
||||||
ULONG s_flags; /* flags */
|
ULONG s_flags; /* flags */
|
||||||
} SCNHDR;
|
} SCNHDR;
|
||||||
#pragma pack(4)
|
#pragma pack(push, 4)
|
||||||
|
|
||||||
typedef struct _SYMBOLFILE_HEADER {
|
typedef struct _SYMBOLFILE_HEADER {
|
||||||
ULONG SymbolsOffset;
|
ULONG SymbolsOffset;
|
||||||
|
@ -135,7 +135,7 @@ typedef struct _STAB_ENTRY {
|
||||||
#define C_ALIAS 105 /* duplicate tag */
|
#define C_ALIAS 105 /* duplicate tag */
|
||||||
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
|
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(push, 1)
|
||||||
typedef struct _COFF_SYMENT
|
typedef struct _COFF_SYMENT
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
|
@ -155,7 +155,7 @@ typedef struct _COFF_SYMENT
|
||||||
UCHAR e_sclass;
|
UCHAR e_sclass;
|
||||||
UCHAR e_numaux;
|
UCHAR e_numaux;
|
||||||
} COFF_SYMENT, *PCOFF_SYMENT;
|
} COFF_SYMENT, *PCOFF_SYMENT;
|
||||||
#pragma pack(4)
|
#pragma pack(pop)
|
||||||
|
|
||||||
#ifdef TARGET_i386
|
#ifdef TARGET_i386
|
||||||
typedef ULONG TARGET_ULONG_PTR;
|
typedef ULONG TARGET_ULONG_PTR;
|
||||||
|
@ -170,6 +170,8 @@ typedef struct _ROSSYM_ENTRY {
|
||||||
ULONG SourceLine;
|
ULONG SourceLine;
|
||||||
} ROSSYM_ENTRY, *PROSSYM_ENTRY;
|
} ROSSYM_ENTRY, *PROSSYM_ENTRY;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
#define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1))
|
#define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1))
|
||||||
|
|
||||||
extern char*
|
extern char*
|
||||||
|
|
Loading…
Reference in a new issue