diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-18 14:09:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-18 14:09:59 +0200 |
commit | 18bed2c174362f76ddedf68bb700e8b2c817fcb5 (patch) | |
tree | 463c4a495386c9ec1869f4434367bfcfc43ea884 /libbutl/target-triplet.cxx | |
parent | 639ff12af754d024a562925a52406ace0d3c673b (diff) |
Complete NetBSD compatibility
Diffstat (limited to 'libbutl/target-triplet.cxx')
-rw-r--r-- | libbutl/target-triplet.cxx | 15 |
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"); |