aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--butl/triplet25
-rw-r--r--butl/triplet.cxx15
-rw-r--r--tests/triplet/driver.cxx4
3 files changed, 25 insertions, 19 deletions
diff --git a/butl/triplet b/butl/triplet
index 14b14c2..f61493d 100644
--- a/butl/triplet
+++ b/butl/triplet
@@ -61,18 +61,19 @@ namespace butl
//
// Some examples of canonicalization and splitting:
//
- // x86_64-apple-darwin14.5.0 x86_64 apple darwin 14.5.0
- // x86_64-unknown-freebsd10.2 x86_64 freebsd 10.2
- // i686-elf i686 elf
- // arm-eabi arm eabi
- // arm-none-eabi arm eabi
- // arm-none-linux-gnueabi arm linux-gnueabi
- // arm-softfloat-linux-gnu arm softfloat linux-gnu
- // i686-pc-mingw32 i686 mingw32
- // i686-w64-mingw32 i686 w64 mingw32
- // i686-lfs-linux-gnu i686 lfs linux-gnu
- // x86_64-unknown-linux-gnu x86_64 linux-gnu
- // x86_64-linux-gnux32 x86_64 linux-gnux32
+ // x86_64-apple-darwin14.5.0 x86_64 apple darwin 14.5.0
+ // x86_64-unknown-freebsd10.2 x86_64 freebsd 10.2
+ // i686-elf i686 elf
+ // arm-eabi arm eabi
+ // arm-none-eabi arm eabi
+ // arm-none-linux-gnueabi arm linux-gnueabi
+ // arm-softfloat-linux-gnu arm softfloat linux-gnu
+ // i686-pc-mingw32 i686 mingw32
+ // i686-w64-mingw32 i686 w64 mingw32
+ // i686-lfs-linux-gnu i686 lfs linux-gnu
+ // x86_64-unknown-linux-gnu x86_64 linux-gnu
+ // x86_64-linux-gnux32 x86_64 linux-gnux32
+ // x86_64-microsoft-win32-msvc14.0 x86_64 microsoft win32-msvc 14.0
//
// References:
//
diff --git a/butl/triplet.cxx b/butl/triplet.cxx
index 3208375..8369539 100644
--- a/butl/triplet.cxx
+++ b/butl/triplet.cxx
@@ -106,13 +106,14 @@ namespace butl
// Finally, extract VERSION for some recognized systems.
//
string::size_type v (0);
- if (system.compare (0, (v = 6), "darwin") == 0 ||
- system.compare (0, (v = 7), "freebsd") == 0 ||
- system.compare (0, (v = 7), "openbsd") == 0 ||
- system.compare (0, (v = 7), "netbsd") == 0 ||
- system.compare (0, (v = 7), "solaris") == 0 ||
- system.compare (0, (v = 7), "aix") == 0 ||
- system.compare (0, (v = 7), "hpux") == 0)
+ if (system.compare (0, (v = 6), "darwin") == 0 ||
+ system.compare (0, (v = 7), "freebsd") == 0 ||
+ system.compare (0, (v = 7), "openbsd") == 0 ||
+ system.compare (0, (v = 6), "netbsd") == 0 ||
+ system.compare (0, (v = 7), "solaris") == 0 ||
+ system.compare (0, (v = 3), "aix") == 0 ||
+ system.compare (0, (v = 4), "hpux") == 0 ||
+ system.compare (0, (v = 10), "win32-msvc") == 0)
{
version.assign (system, v, string::npos);
system.resize (system.size () - version.size ());
diff --git a/tests/triplet/driver.cxx b/tests/triplet/driver.cxx
index 9d51fed..fdd5939 100644
--- a/tests/triplet/driver.cxx
+++ b/tests/triplet/driver.cxx
@@ -102,6 +102,10 @@ main ()
assert (test ("sparc-sun-solaris2.9",
"sparc-sun-solaris2.9",
"sparc", "sun", "solaris", "2.9"));
+
+ assert (test ("x86_64-microsoft-win32-msvc14.0",
+ "x86_64-microsoft-win32-msvc14.0",
+ "x86_64", "microsoft", "win32-msvc", "14.0"));
}
static bool