Vultraz

Untitled

Dec 30th, 2015
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.62 KB | None | 0 0
  1.  src/wesnoth.cpp | 14 +++++++++-----
  2.  1 file changed, 9 insertions(+), 5 deletions(-)
  3.  
  4. diff --git a/src/wesnoth.cpp b/src/wesnoth.cpp
  5. index 3ee71c9..7a1746f 100644
  6. --- a/src/wesnoth.cpp
  7. +++ b/src/wesnoth.cpp
  8. @@ -63,10 +63,14 @@
  9.  
  10.  #ifdef _WIN32
  11.  #include "log_windows.hpp"
  12. -#else
  13. -#include <fenv.h>
  14. +
  15. +#include <float.h>
  16.  #endif // _WIN32
  17.  
  18. +#ifndef _MSC_VER
  19. +#include <fenv.h>
  20. +#endif // _MSC_VER
  21. +
  22.  #include <SDL.h>                        // for SDL_Init, SDL_INIT_TIMER
  23.  #include <boost/foreach.hpp>            // for auto_any_base, etc
  24.  #include <boost/iostreams/categories.hpp>  // for input, output
  25. @@ -516,7 +520,7 @@ static void handle_lua_script_args(game_launcher * game, commandline_options & /
  26.     }
  27.  }
  28.  
  29. -#ifdef _WIN32
  30. +#ifdef _MSC_VER
  31.  static void check_fpu()
  32.  {
  33.     uint32_t f_control;
  34. @@ -525,7 +529,7 @@ static void check_fpu()
  35.         uint32_t rounding_mode = f_control & _MCW_RC;
  36.         uint32_t precision_mode = f_control & _MCW_PC;
  37.         if(rounding_mode != _RC_NEAR) {
  38. -           std::cerr << "Floating point rounding mode is currently '" <<
  39. +           std::cerr << "Floating point rounding mode is currently '" <<
  40.                 ((rounding_mode == _RC_CHOP) ? "chop" :
  41.                 (rounding_mode == _RC_UP) ? "up" :
  42.                 (rounding_mode == _RC_DOWN) ? "down" :
  43. @@ -536,7 +540,7 @@ static void check_fpu()
  44.             }
  45.         }
  46.         if(precision_mode != _PC_53) {
  47. -           std::cerr << "Floating point precision mode is currently '" <<
  48. +           std::cerr << "Floating point precision mode is currently '" <<
  49.                 ((precision_mode == _PC_53) ? "double" :
  50.                 (precision_mode == _PC_24) ? "single" :
  51.                 (precision_mode == _PC_64 ) ? "double extended" :
Advertisement
Add Comment
Please, Sign In to add comment