Skip to content

Commit

Permalink
Visual Studio build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Jun 15, 2016
1 parent 89c7c45 commit 6d24d13
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions dataflowAPI/src/RoseInsnFactory.C
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,12 @@ bool RoseInsnPPCFactory::handleSpecialCases(entryID iapi_opcode,
raw = raw << 8;
raw |= bytes[i];
}
#ifdef os_windows
// Visual Studio doensn't define htobe32, so we assume that Windows is always little endian.
raw = _byteswap_ulong(raw);
#else
raw = htobe32(raw);
#endif
bool isAbsolute = (bool)(raw & 0x00000002);
bool isLink = (bool)(raw & 0x00000001);
rose_insn->set_kind(makeRoseBranchOpcode(iapi_opcode, isAbsolute, isLink));
Expand Down
2 changes: 1 addition & 1 deletion dyninstAPI/src/StackMod/StackLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class StackLocation {
};

struct less_StackLocation: public std::binary_function<StackLocation*, StackLocation*, bool> {
bool operator()(StackLocation* a, StackLocation* b) {
bool operator()(StackLocation* a, StackLocation* b) const {
if (a->isStackMemory() && b->isStackMemory()) {
if (a->off().height() == b->off().height()) {
if (a->isRegisterHeight() && b->isRegisterHeight()) {
Expand Down
2 changes: 1 addition & 1 deletion proccontrol/h/EventType.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class PC_EXPORT EventType

struct eventtype_cmp
{
bool operator()(const EventType &a, const EventType &b)
bool operator()(const EventType &a, const EventType &b) const
{
if (a.code() < b.code())
return true;
Expand Down
2 changes: 1 addition & 1 deletion stackwalk/h/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ SW_EXPORT bool frame_lineno_cmp(const Frame &a, const Frame &b);
class FrameNode;
struct SW_EXPORT frame_cmp_wrapper {
frame_cmp_t f;
bool operator()(const FrameNode *a, const FrameNode *b);
bool operator()(const FrameNode *a, const FrameNode *b) const;
};
typedef std::set<FrameNode *, frame_cmp_wrapper> frame_set_t;

Expand Down
2 changes: 1 addition & 1 deletion stackwalk/src/frame.C
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ FrameNode::~FrameNode()
{
}

inline bool frame_cmp_wrapper::operator()(const FrameNode *a, const FrameNode *b) {
inline bool frame_cmp_wrapper::operator()(const FrameNode *a, const FrameNode *b) const {
if (a->frame_type == FrameNode::FTThread && b->frame_type == FrameNode::FTThread) {
Dyninst::PID a_pid = a->getWalker()->getProcessState()->getProcessId();
Dyninst::PID b_pid = b->getWalker()->getProcessState()->getProcessId();
Expand Down

0 comments on commit 6d24d13

Please sign in to comment.