--- a/client/cs_platforms.cpp
+++ b/client/cs_platforms.cpp
@@ -76,6 +76,21 @@ void CLIENT_STATE::add_platform(const ch
 //
 void CLIENT_STATE::detect_platforms() {
 
+// if specified - use it
+#ifdef HOSTTYPE
+    add_platform(HOSTTYPE);
+#endif
+
+// if specified - use it
+#ifdef HOSTTYPEALT
+    add_platform(HOSTTYPEALT);
+#endif
+
+// if both the hosttype and its alternative are specified,
+// there is no need to look further and one should go directly
+// to the inspection of the cc_config.xml data
+#if !defined(HOSTTYPE) || !defined(HOSTTYPEALT)
+
 #if defined(_WIN32) && !defined(__CYGWIN32__)
 #if defined(_WIN64) && defined(_M_X64)
     add_platform("windows_x86_64");
@@ -210,15 +225,6 @@ void CLIENT_STATE::detect_platforms() {
         add_platform("i686-pc-linux-gnu");
     }
 
-    if (!(support64 || support32)) {
-        // Something went wrong. Assume HOSTTYPE and HOSTTYPEALT
-        // are correct
-        add_platform(HOSTTYPE);
-#ifdef HOSTTYPEALT
-        add_platform(HOSTTYPEALT);
-#endif
-    }
-
 #elif defined(sun)
     // Check if we can run 64-bit binaries...
     // this assumes there isn't a 64-bit only solaris.  (Every 64-bit solaris can run 32 bit binaries)
@@ -294,6 +300,8 @@ void CLIENT_STATE::detect_platforms() {
 #endif
 
 #endif
+
+#endif
 
     if (cc_config.no_alt_platform) {
         PLATFORM p = platforms[0];
