Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rochus-keller committed May 5, 2024
1 parent ac0d9a0 commit aaefe08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/ocpp/ppInclude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,17 @@ std::string ppInclude::SrchPath(bool system, const std::string& name, const std:
}
AddName(buf, name);

#ifdef TARGET_OS_WINDOWS
while (char* p = (char*)strchr(buf, '/'))
{
*p = CmdFiles::DIR_SEP[0];
}
#else
while (char* p = (char*)strchr(buf, CmdFiles::DIR_SEP[0]))
{
*p = '/';
}
#endif
if (Utils::FileExists(buf))
{
if (filesSkipped > 0) // we lie to ourselves about how many files we skip while searching so that we go past the
Expand Down Expand Up @@ -489,4 +496,4 @@ bool ppInclude::GetLine(std::string& line, int& lineno)
popFile();
}
return false;
}
}
2 changes: 1 addition & 1 deletion src/util/CmdSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ bool CmdSwitchParser::Parse(int* argc, char* argv[])
(*argc)--;
}
else if ((argv[0][0] == '-' ||
#ifdef _WIN32
#ifdef TARGET_OS_WINDOWS
argv[0][0] == '/' ||
#endif
(argv[0][0] == '+' && argv[0][1] != '-')) && argv[0][1] &&
Expand Down
2 changes: 1 addition & 1 deletion src/util/SharedMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SharedMemory
void SetName();
std::string name_;

unsigned max_;
const unsigned max_;
const unsigned windowSize_;
unsigned current_;
void* fileHandle_;
Expand Down

0 comments on commit aaefe08

Please sign in to comment.