Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation for tools/armips.cpp by removing #undef __STRICT_ANSI__ #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions tools/armips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ SOFTWARE.


#define _CRT_SECURE_NO_WARNINGS
#undef __STRICT_ANSI__

#if defined(__clang__)
#if __has_feature(cxx_exceptions)
Expand Down Expand Up @@ -15903,16 +15902,19 @@ int runFromCommandLine(const StringList& arguments, ArmipsArguments settings)
#include <vector>
#include <algorithm>

#ifndef _WIN32
#include <strings.h>
#define _stricmp strcasecmp
#endif
#include <cctype>

static bool stringEqualInsensitive(const std::string& a, const std::string& b)
{
if (a.size() != b.size())
return false;
return _stricmp(a.c_str(),b.c_str()) == 0;

auto compare = [](char c1, char c2)
{
return std::tolower(c1) == std::tolower(c2);
};

return std::equal(a.begin(), a.end(), b.begin(), compare);
}

bool compareSection(ElfSection* a, ElfSection* b)
Expand Down