select_platform_config.hpp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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(__HAIKU__)
  34. // Haiku
  35. # define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
  36. #elif defined(__BEOS__)
  37. // BeOS
  38. # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
  39. #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
  40. // MacOS
  41. # define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
  42. #elif defined(__TOS_MVS__)
  43. // IBM z/OS
  44. # define BOOST_PLATFORM_CONFIG "boost/config/platform/zos.hpp"
  45. #elif defined(__IBMCPP__) || defined(_AIX)
  46. // IBM AIX
  47. # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
  48. #elif defined(__amigaos__)
  49. // AmigaOS
  50. # define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
  51. #elif defined(__QNXNTO__)
  52. // QNX:
  53. # define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
  54. #elif defined(__VXWORKS__)
  55. // vxWorks:
  56. # define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
  57. #elif defined(__SYMBIAN32__)
  58. // Symbian:
  59. # define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
  60. #elif defined(_CRAYC)
  61. // Cray:
  62. # define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
  63. #elif defined(__VMS)
  64. // VMS:
  65. # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
  66. #elif defined(__CloudABI__)
  67. // Nuxi CloudABI:
  68. # define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp"
  69. #elif defined (__wasm__)
  70. // Web assembly:
  71. # define BOOST_PLATFORM_CONFIG "boost/config/platform/wasm.hpp"
  72. #else
  73. # if defined(unix) \
  74. || defined(__unix) \
  75. || defined(_XOPEN_SOURCE) \
  76. || defined(_POSIX_SOURCE)
  77. // generic unix platform:
  78. # ifndef BOOST_HAS_UNISTD_H
  79. # define BOOST_HAS_UNISTD_H
  80. # endif
  81. # include <boost/config/detail/posix_features.hpp>
  82. # endif
  83. # if defined (BOOST_ASSERT_CONFIG)
  84. // this must come last - generate an error if we don't
  85. // recognise the platform:
  86. # error "Unknown platform - please configure and report the results to boost.org"
  87. # endif
  88. #endif
  89. #if 0
  90. //
  91. // This section allows dependency scanners to find all the files we *might* include:
  92. //
  93. # include "boost/config/platform/linux.hpp"
  94. # include "boost/config/platform/bsd.hpp"
  95. # include "boost/config/platform/solaris.hpp"
  96. # include "boost/config/platform/irix.hpp"
  97. # include "boost/config/platform/hpux.hpp"
  98. # include "boost/config/platform/cygwin.hpp"
  99. # include "boost/config/platform/win32.hpp"
  100. # include "boost/config/platform/beos.hpp"
  101. # include "boost/config/platform/macos.hpp"
  102. # include "boost/config/platform/zos.hpp"
  103. # include "boost/config/platform/aix.hpp"
  104. # include "boost/config/platform/amigaos.hpp"
  105. # include "boost/config/platform/qnxnto.hpp"
  106. # include "boost/config/platform/vxworks.hpp"
  107. # include "boost/config/platform/symbian.hpp"
  108. # include "boost/config/platform/cray.hpp"
  109. # include "boost/config/platform/vms.hpp"
  110. # include <boost/config/detail/posix_features.hpp>
  111. #endif