select_platform_config.hpp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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__)) && !defined(_CRAYC)
  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. #elif defined(__SYMBIAN32__)
  52. // Symbian:
  53. # define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
  54. #elif defined(_CRAYC)
  55. // Cray:
  56. # define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
  57. #elif defined(__VMS)
  58. // VMS:
  59. # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
  60. #else
  61. # if defined(unix) \
  62. || defined(__unix) \
  63. || defined(_XOPEN_SOURCE) \
  64. || defined(_POSIX_SOURCE)
  65. // generic unix platform:
  66. # ifndef BOOST_HAS_UNISTD_H
  67. # define BOOST_HAS_UNISTD_H
  68. # endif
  69. # include <boost/config/posix_features.hpp>
  70. # endif
  71. # if defined (BOOST_ASSERT_CONFIG)
  72. // this must come last - generate an error if we don't
  73. // recognise the platform:
  74. # error "Unknown platform - please configure and report the results to boost.org"
  75. # endif
  76. #endif