_solaris.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef __stl_config__solaris_h
  2. #define __stl_config__solaris_h
  3. #define _STLP_PLATFORM "Sun Solaris"
  4. /* include system features file */
  5. #include <sys/feature_tests.h>
  6. /* system-dependent defines */
  7. #define _STLP_USE_UNIX_IO
  8. #ifdef __GNUC__
  9. /*
  10. * See comments (and configuration defines) in the host.h
  11. */
  12. # if !(defined(__SunOS_5_5_1) || defined(__SunOS_5_6) || defined(__SunOS_5_7) || \
  13. defined(__SunOS_5_8) || defined(__SunOS_5_9) || defined(__SunOS_5_10))
  14. # error Uncomment one of the defines (__SunOS_5_x) in the file stlport/stl/config/host.h
  15. # endif
  16. #endif
  17. #if defined (__SunOS_5_8) && ! defined (_STLP_HAS_NO_NEW_C_HEADERS) && ( __cplusplus >= 199711L)
  18. # define _STLP_HAS_NATIVE_FLOAT_ABS
  19. #endif
  20. #if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
  21. # define _STLP_RAND48 1
  22. #endif
  23. #if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) || defined (__SunOS_5_6)
  24. # define _STLP_WCHAR_SUNPRO_EXCLUDE 1
  25. # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
  26. #endif
  27. /* boris : this should always be defined for Solaris 5 & 6. Any ideas how to do it? */
  28. #if !(defined ( __KCC ) && __KCC_VERSION > 3400 ) && \
  29. ((defined(__SunOS_5_5_1) || defined(__SunOS_5_6) ))
  30. # ifndef _STLP_NO_NATIVE_MBSTATE_T
  31. # define _STLP_NO_NATIVE_MBSTATE_T 1
  32. # endif
  33. #endif /* KCC */
  34. /* For SPARC we use lightweight synchronization */
  35. #if defined (__sparc) /* && (defined (_REENTRANT) || defined (_PTHREADS)) */
  36. # if ( (defined (__GNUC__) && defined (__sparc_v9__)) || \
  37. defined (__sparcv9) ) \
  38. && !defined(_NOTHREADS) && !defined (_STLP_NO_SPARC_SOLARIS_THREADS)
  39. # define _STLP_SPARC_SOLARIS_THREADS
  40. # define _STLP_THREADS_DEFINED
  41. # endif
  42. #endif
  43. /* gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus.
  44. * limits.h contains invalid values for this combination
  45. */
  46. #ifdef __GNUC__
  47. # if (defined (__sparc_v9__) || defined (__sparcv9)) && !defined ( __WORD64 ) && !defined(__arch64__)
  48. # define __LONG_MAX__ 2147483647L
  49. # endif
  50. #endif
  51. /*
  52. * Attention! See comments (and configuration defines) in the host.h
  53. * (you host may has MATH_F and MATH_L functions)
  54. *
  55. */
  56. #if !defined(__SunOS_5_10) && !defined(_STLP_SOLARIS_MATH_PATCH)
  57. # define _STLP_NO_VENDOR_MATH_F
  58. # define _STLP_NO_VENDOR_MATH_L
  59. #endif
  60. #ifdef __GNUC__
  61. # define _STLP_WCHAR_BORLAND_EXCLUDE
  62. # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
  63. #endif
  64. #endif /* __stl_config__solaris_h */