blob: eeaeecde9facfc2786b9e9d2877b86811d4e3adf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--- a/client/cs_platforms.cpp
+++ b/client/cs_platforms.cpp
@@ -171,6 +171,21 @@ int launch_child_process_to_detect_emula
//
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");
@@ -306,15 +321,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)
@@ -390,6 +396,8 @@ void CLIENT_STATE::detect_platforms() {
#endif
#endif
+
+#endif
if (cc_config.no_alt_platform) {
PLATFORM p = platforms[0];
|