aboutsummaryrefslogtreecommitdiff
path: root/libbutl/target-triplet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/target-triplet.cxx')
-rw-r--r--libbutl/target-triplet.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/libbutl/target-triplet.cxx b/libbutl/target-triplet.cxx
index 8eb6de6..c2535b1 100644
--- a/libbutl/target-triplet.cxx
+++ b/libbutl/target-triplet.cxx
@@ -54,16 +54,14 @@ namespace butl
// VENDOR. Unless it is a first component of two-component system, as in
// i686-linux-gnu.
//
- if (f != l)
+ // There are also cases like x86_64--netbsd.
+ //
+ if (l - f > 1)
{
// [f, p) is VENDOR.
//
string::size_type p (s.find ('-', ++f)), n (p - f);
- if (n == 0) {
- goto netbsd_empty_vendor;
- }
-
// Do we have all four components? If so, then we don't need to do any
// special recognition of two-component systems.
//
@@ -103,8 +101,6 @@ namespace butl
}
}
-netbsd_empty_vendor:
-
// (l, npos) is SYSTEM
//
system.assign (s, ++l, string::npos);
@@ -112,11 +108,6 @@ netbsd_empty_vendor:
if (system.empty ())
bad ("missing os/kernel/abi");
- if (system.compare(0, 6, "netbsd") == 0)
- vendor.assign("unknown");
- else
- bad("empty vendor");
-
if (system.front () == '-' || system.back () == '-')
bad ("invalid os/kernel/abi");