You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. --- a/client/cs_platforms.cpp
  2. +++ b/client/cs_platforms.cpp
  3. @@ -76,6 +76,21 @@ void CLIENT_STATE::add_platform(const ch
  4. //
  5. void CLIENT_STATE::detect_platforms() {
  6. +// if specified - use it
  7. +#ifdef HOSTTYPE
  8. + add_platform(HOSTTYPE);
  9. +#endif
  10. +
  11. +// if specified - use it
  12. +#ifdef HOSTTYPEALT
  13. + add_platform(HOSTTYPEALT);
  14. +#endif
  15. +
  16. +// if both the hosttype and its alternative are specified,
  17. +// there is no need to look further and one should go directly
  18. +// to the inspection of the cc_config.xml data
  19. +#if !defined(HOSTTYPE) || !defined(HOSTTYPEALT)
  20. +
  21. #if defined(_WIN32) && !defined(__CYGWIN32__)
  22. #if defined(_WIN64) && defined(_M_X64)
  23. add_platform("windows_x86_64");
  24. @@ -210,15 +225,6 @@ void CLIENT_STATE::detect_platforms() {
  25. add_platform("i686-pc-linux-gnu");
  26. }
  27. - if (!(support64 || support32)) {
  28. - // Something went wrong. Assume HOSTTYPE and HOSTTYPEALT
  29. - // are correct
  30. - add_platform(HOSTTYPE);
  31. -#ifdef HOSTTYPEALT
  32. - add_platform(HOSTTYPEALT);
  33. -#endif
  34. - }
  35. -
  36. #elif defined(sun)
  37. // Check if we can run 64-bit binaries...
  38. // this assumes there isn't a 64-bit only solaris. (Every 64-bit solaris can run 32 bit binaries)
  39. @@ -294,6 +300,8 @@ void CLIENT_STATE::detect_platforms() {
  40. #endif
  41. #endif
  42. +
  43. +#endif
  44. if (cc_config.no_alt_platform) {
  45. PLATFORM p = platforms[0];