symbian.hpp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // (C) Copyright Yuriy Krasnoschek 2009.
  2. // (C) Copyright John Maddock 2001 - 2003.
  3. // (C) Copyright Jens Maurer 2001 - 2003.
  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. // symbian specific config options:
  9. #define BOOST_PLATFORM "Symbian"
  10. #define BOOST_SYMBIAN 1
  11. #if defined(__S60_3X__)
  12. // Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL
  13. # define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK
  14. // make sure we have __GLIBC_PREREQ if available at all
  15. #ifdef __cplusplus
  16. #include <cstdlib>
  17. #else
  18. #include <stdlib.h>
  19. #endif// boilerplate code:
  20. # define BOOST_HAS_UNISTD_H
  21. # include <boost/config/detail/posix_features.hpp>
  22. // S60 SDK defines _POSIX_VERSION as POSIX.1
  23. # ifndef BOOST_HAS_STDINT_H
  24. # define BOOST_HAS_STDINT_H
  25. # endif
  26. # ifndef BOOST_HAS_GETTIMEOFDAY
  27. # define BOOST_HAS_GETTIMEOFDAY
  28. # endif
  29. # ifndef BOOST_HAS_DIRENT_H
  30. # define BOOST_HAS_DIRENT_H
  31. # endif
  32. # ifndef BOOST_HAS_SIGACTION
  33. # define BOOST_HAS_SIGACTION
  34. # endif
  35. # ifndef BOOST_HAS_PTHREADS
  36. # define BOOST_HAS_PTHREADS
  37. # endif
  38. # ifndef BOOST_HAS_NANOSLEEP
  39. # define BOOST_HAS_NANOSLEEP
  40. # endif
  41. # ifndef BOOST_HAS_SCHED_YIELD
  42. # define BOOST_HAS_SCHED_YIELD
  43. # endif
  44. # ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
  45. # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
  46. # endif
  47. # ifndef BOOST_HAS_LOG1P
  48. # define BOOST_HAS_LOG1P
  49. # endif
  50. # ifndef BOOST_HAS_EXPM1
  51. # define BOOST_HAS_EXPM1
  52. # endif
  53. # ifndef BOOST_POSIX_API
  54. # define BOOST_POSIX_API
  55. # endif
  56. // endianess support
  57. # include <sys/endian.h>
  58. // Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER
  59. # ifndef __LITTLE_ENDIAN
  60. # ifdef _LITTLE_ENDIAN
  61. # define __LITTLE_ENDIAN _LITTLE_ENDIAN
  62. # else
  63. # define __LITTLE_ENDIAN 1234
  64. # endif
  65. # endif
  66. # ifndef __BIG_ENDIAN
  67. # ifdef _BIG_ENDIAN
  68. # define __BIG_ENDIAN _BIG_ENDIAN
  69. # else
  70. # define __BIG_ENDIAN 4321
  71. # endif
  72. # endif
  73. # ifndef __BYTE_ORDER
  74. # define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE
  75. # endif
  76. // Known limitations
  77. # define BOOST_ASIO_DISABLE_SERIAL_PORT
  78. # define BOOST_DATE_TIME_NO_LOCALE
  79. # define BOOST_NO_STD_WSTRING
  80. # define BOOST_EXCEPTION_DISABLE
  81. # define BOOST_NO_EXCEPTIONS
  82. #else // TODO: More platform support e.g. UIQ
  83. # error "Unsuppoted Symbian SDK"
  84. #endif
  85. #if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32)
  86. # define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro
  87. #endif