More Windows Fixes

This commit is contained in:
Florian Märkl committed 2019-09-02 17:34:43 +02:00
1 parent 75df3a6a77
commit c8de9fb7ab
7 files changed
+26 -8

No files matched your search

+2 -1
View File
@@ -46,7 +46,8 @@ if(WIN32)
socket
fs
magic
crypto)
crypto
sdb)
set(Radare2_LIBRARIES "")
set(Radare2_LIBRARIES_VARS "")
+4
View File
@@ -20,4 +20,8 @@ if(APPLE)
target_link_options(r2ghidra_cutter PRIVATE -undefined dynamic_lookup)
endif()
if(WIN32)
target_link_options(r2ghidra_cutter PRIVATE -FORCE:UNRESOLVED)
endif()
install(TARGETS r2ghidra_cutter DESTINATION "${CUTTER_INSTALL_PLUGDIR}")
+3 -1
View File
@@ -206,10 +206,12 @@ if(BUILD_SLASPECS)
file(MAKE_DIRECTORY "${SLEIGH_BASE}")
foreach(slaspec ${SLASPEC_FILES})
get_filename_component(sleigh_name "${slaspec}" NAME_WE)
get_filename_component(sleigh_dir "${slaspec}" DIRECTORY)
set(sla_file "${SLEIGH_BASE}/${sleigh_name}.sla")
add_custom_command(OUTPUT "${sla_file}"
COMMAND sleighc "${slaspec}" "${sla_file}"
MAIN_DEPENDENCY "${slaspec}")
MAIN_DEPENDENCY "${slaspec}"
WORKING_DIRECTORY "${sleigh_dir}")
list(APPEND SLAFILES "${sla_file}")
endforeach()
add_custom_target(sla ALL DEPENDS ${SLAFILES})
+2 -2
View File
@@ -27,8 +27,8 @@ void AnnotateOpref(ANNOTATOR_PARAMS)
pugi::xml_attribute attr = node.attribute("opref");
if(attr.empty())
return;
unsigned long long opref = attr.as_ullong(ULONG_LONG_MAX);
if(opref == ULONG_LONG_MAX)
unsigned long long opref = attr.as_ullong(ULLONG_MAX);
if(opref == ULLONG_MAX)
return;
auto opit = ctx->ops.find((uintm)opref);
if(opit == ctx->ops.end())
+5
View File
@@ -7,6 +7,11 @@
#include <r_types.h>
// Windows defines LoadImage to LoadImageA
#ifdef LoadImage
#undef LoadImage
#endif
class R2Architecture;
typedef struct r_anal_function_t RAnalFunction;
typedef struct r_flag_item_t RFlagItem;
+5 -4
View File
@@ -2,11 +2,12 @@
#include "R2TypeFactory.h"
#include "R2Architecture.h"
#include "R2Utils.h"
#include <r_parse.h>
#include <r_core.h>
#include "R2Utils.h"
R2TypeFactory::R2TypeFactory(R2Architecture *arch)
: TypeFactory(arch),
arch(arch)
@@ -69,9 +70,9 @@ Datatype *R2TypeFactory::queryR2Struct(const string &n)
memberType = getTypeArray(elements, memberType);
fields.push_back({
.offset = offset,
.name = memberName,
.type = memberType
offset,
memberName,
memberType
});
}
+5
View File
@@ -3,6 +3,11 @@
#include "R2Architecture.h"
#include "CodeXMLParse.h"
// Windows clash
#ifdef restrict
#undef restrict
#endif
#include <libdecomp.hh>
#include <printc.hh>
#include "R2PrintC.h"