Source: Restore compilation on OpenBSD
We cannot use `OpenBSD` as a name, it is defined in `sys/param.h`.
This commit is contained in:
parent
47bfca8494
commit
1fafe35e81
@ -260,7 +260,7 @@ cmComputeLinkInformation::cmComputeLinkInformation(
|
|||||||
, Config(config)
|
, Config(config)
|
||||||
{
|
{
|
||||||
// Check whether to recognize OpenBSD-style library versioned names.
|
// Check whether to recognize OpenBSD-style library versioned names.
|
||||||
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
this->IsOpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||||
"FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
"FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
||||||
|
|
||||||
// Allocate internals.
|
// Allocate internals.
|
||||||
@ -1574,7 +1574,7 @@ std::string cmComputeLinkInformation::CreateExtensionRegex(
|
|||||||
libext += ')';
|
libext += ')';
|
||||||
|
|
||||||
// Add an optional OpenBSD-style version or major.minor.version component.
|
// Add an optional OpenBSD-style version or major.minor.version component.
|
||||||
if (this->OpenBSD || type == LinkShared) {
|
if (this->IsOpenBSD || type == LinkShared) {
|
||||||
libext += "(\\.[0-9]+)*";
|
libext += "(\\.[0-9]+)*";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ private:
|
|||||||
std::unique_ptr<cmOrderDirectories> OrderRuntimeSearchPath;
|
std::unique_ptr<cmOrderDirectories> OrderRuntimeSearchPath;
|
||||||
|
|
||||||
bool OldLinkDirMode;
|
bool OldLinkDirMode;
|
||||||
bool OpenBSD;
|
bool IsOpenBSD;
|
||||||
bool LinkDependsNoShared;
|
bool LinkDependsNoShared;
|
||||||
bool RuntimeUseChrpath;
|
bool RuntimeUseChrpath;
|
||||||
bool NoSONameUsesPath;
|
bool NoSONameUsesPath;
|
||||||
|
@ -207,7 +207,7 @@ struct cmFindLibraryHelper
|
|||||||
std::string BestPath;
|
std::string BestPath;
|
||||||
|
|
||||||
// Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
|
// Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
|
||||||
bool OpenBSD;
|
bool IsOpenBSD;
|
||||||
|
|
||||||
bool DebugMode;
|
bool DebugMode;
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ cmFindLibraryHelper::cmFindLibraryHelper(std::string debugName, cmMakefile* mf,
|
|||||||
this->RegexFromList(this->SuffixRegexStr, this->Suffixes);
|
this->RegexFromList(this->SuffixRegexStr, this->Suffixes);
|
||||||
|
|
||||||
// Check whether to use OpenBSD-style library version comparisons.
|
// Check whether to use OpenBSD-style library version comparisons.
|
||||||
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
this->IsOpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||||
"FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
"FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ void cmFindLibraryHelper::AddName(std::string const& name)
|
|||||||
std::string regex = cmStrCat('^', this->PrefixRegexStr);
|
std::string regex = cmStrCat('^', this->PrefixRegexStr);
|
||||||
this->RegexFromLiteral(regex, name);
|
this->RegexFromLiteral(regex, name);
|
||||||
regex += this->SuffixRegexStr;
|
regex += this->SuffixRegexStr;
|
||||||
if (this->OpenBSD) {
|
if (this->IsOpenBSD) {
|
||||||
regex += "(\\.[0-9]+\\.[0-9]+)?";
|
regex += "(\\.[0-9]+\\.[0-9]+)?";
|
||||||
}
|
}
|
||||||
regex += "$";
|
regex += "$";
|
||||||
@ -472,7 +472,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
|
|||||||
size_type suffix = this->GetSuffixIndex(name.Regex.match(2));
|
size_type suffix = this->GetSuffixIndex(name.Regex.match(2));
|
||||||
unsigned int major = 0;
|
unsigned int major = 0;
|
||||||
unsigned int minor = 0;
|
unsigned int minor = 0;
|
||||||
if (this->OpenBSD) {
|
if (this->IsOpenBSD) {
|
||||||
sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
|
sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
|
||||||
}
|
}
|
||||||
if (this->BestPath.empty() || prefix < bestPrefix ||
|
if (this->BestPath.empty() || prefix < bestPrefix ||
|
||||||
|
Loading…
Reference in New Issue
Block a user