win32.hpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // (C) Copyright John Maddock 2001 - 2003.
  2. // (C) Copyright Bill Kempf 2001.
  3. // (C) Copyright Aleksey Gurtovoy 2003.
  4. // (C) Copyright Rene Rivera 2005.
  5. // Use, modification and distribution are subject to the
  6. // Boost Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. // See http://www.boost.org for most recent version.
  9. // Win32 specific config options:
  10. #define BOOST_PLATFORM "Win32"
  11. // Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.
  12. #if defined(__MINGW32__)
  13. # include <_mingw.h>
  14. #endif
  15. #if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
  16. # define BOOST_NO_SWPRINTF
  17. #endif
  18. // Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
  19. // If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
  20. // its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and
  21. // BOOST_SYMBOL_IMPORT
  22. #ifndef BOOST_SYMBOL_EXPORT
  23. # define BOOST_HAS_DECLSPEC
  24. # define BOOST_SYMBOL_EXPORT __declspec(dllexport)
  25. # define BOOST_SYMBOL_IMPORT __declspec(dllimport)
  26. #endif
  27. #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
  28. # define BOOST_HAS_STDINT_H
  29. # ifndef __STDC_LIMIT_MACROS
  30. # define __STDC_LIMIT_MACROS
  31. # endif
  32. # define BOOST_HAS_DIRENT_H
  33. # define BOOST_HAS_UNISTD_H
  34. #endif
  35. #if defined(__MINGW32__) && (__GNUC__ >= 4)
  36. // Mingw has these functions but there are persistent problems
  37. // with calls to these crashing, so disable for now:
  38. //# define BOOST_HAS_EXPM1
  39. //# define BOOST_HAS_LOG1P
  40. # define BOOST_HAS_GETTIMEOFDAY
  41. #endif
  42. //
  43. // Win32 will normally be using native Win32 threads,
  44. // but there is a pthread library avaliable as an option,
  45. // we used to disable this when BOOST_DISABLE_WIN32 was
  46. // defined but no longer - this should allow some
  47. // files to be compiled in strict mode - while maintaining
  48. // a consistent setting of BOOST_HAS_THREADS across
  49. // all translation units (needed for shared_ptr etc).
  50. //
  51. #ifndef BOOST_HAS_PTHREADS
  52. # define BOOST_HAS_WINTHREADS
  53. #endif
  54. //
  55. // WinCE configuration:
  56. //
  57. #if defined(_WIN32_WCE) || defined(UNDER_CE)
  58. # define BOOST_NO_ANSI_APIS
  59. // Windows CE does not have a conforming signature for swprintf
  60. # define BOOST_NO_SWPRINTF
  61. #else
  62. # define BOOST_HAS_GETSYSTEMTIMEASFILETIME
  63. # define BOOST_HAS_THREADEX
  64. # define BOOST_HAS_GETSYSTEMTIMEASFILETIME
  65. #endif
  66. //
  67. // Windows Runtime
  68. //
  69. #if defined(WINAPI_FAMILY) && \
  70. (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
  71. # define BOOST_NO_ANSI_APIS
  72. #endif
  73. #ifndef BOOST_DISABLE_WIN32
  74. // WEK: Added
  75. #define BOOST_HAS_FTIME
  76. #define BOOST_WINDOWS 1
  77. #endif