select_platform_config.hpp 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Boost compiler configuration selection header file
  2. // (C) Copyright John Maddock 2001 - 2002.
  3. // (C) Copyright Jens Maurer 2001.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org for most recent version.
  8. // locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
  9. // Note that we define the headers to include using "header_name" not
  10. // <header_name> in order to prevent macro expansion within the header
  11. // name (for example "linux" is a macro on linux systems).
  12. #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
  13. // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
  14. # define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
  15. #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
  16. // BSD:
  17. # define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
  18. #elif defined(sun) || defined(__sun)
  19. // solaris:
  20. # define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
  21. #elif defined(__sgi)
  22. // SGI Irix:
  23. # define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
  24. #elif defined(__hpux)
  25. // hp unix:
  26. # define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
  27. #elif defined(__CYGWIN__)
  28. // cygwin is not win32:
  29. # define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
  30. #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
  31. // win32:
  32. # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
  33. #elif defined(__BEOS__)
  34. // BeOS
  35. # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
  36. #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
  37. // MacOS
  38. # define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
  39. #elif defined(__IBMCPP__) || defined(_AIX)
  40. // IBM
  41. # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
  42. #elif defined(__amigaos__)
  43. // AmigaOS
  44. # define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
  45. #elif defined(__QNXNTO__)
  46. // QNX:
  47. # define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
  48. #elif defined(__VXWORKS__)
  49. // vxWorks:
  50. # define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
  51. #else
  52. # if defined(unix) \
  53. || defined(__unix) \
  54. || defined(_XOPEN_SOURCE) \
  55. || defined(_POSIX_SOURCE)
  56. // generic unix platform:
  57. # ifndef BOOST_HAS_UNISTD_H
  58. # define BOOST_HAS_UNISTD_H
  59. # endif
  60. # include <boost/config/posix_features.hpp>
  61. # endif
  62. # if defined (BOOST_ASSERT_CONFIG)
  63. // this must come last - generate an error if we don't
  64. // recognise the platform:
  65. # error "Unknown platform - please configure and report the results to boost.org"
  66. # endif
  67. #endif