_como.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. // STLport configuration file
  2. // It is internal STLport header - DO NOT include it directly
  3. #define _STLP_COMPILER "Comeau"
  4. #include <stl/config/_native_headers.h>
  5. #define _STLP_UINT32_T unsigned int
  6. #define _STLP_HAS_NO_NEW_C_HEADERS
  7. // #define _STLP_VENDOR_GLOBAL_EXCEPT_STD
  8. #define _STLP_LONG_LONG long long
  9. //
  10. // ADDITIONS FOR COMEAU C++, made by Comeau Computing.
  11. // We can be reached through comeau@comeaucomputing.com
  12. // You shouldn't need to change anything below here for Comeau C++.
  13. // If you do, please tell us at comeau@comeaucomputing.com
  14. //
  15. // Changes made here, AND THROUGH ALL FILES, based upon the __COMO__ macro
  16. // (and SIMILAR NAMES INVOLVING COMO).... no doubt some of this will
  17. // change as SGI integrates the changes into their code base since
  18. // some changes are not really Comeau C++ specific, but required to
  19. // make the SGI code compliant with Standard C++).
  20. //
  21. // Testing was done with Comeau C++ 4.2.44 and 4.2.45.2. Changes were made for
  22. // both Comeau relaxed mode and Comeau strict mode, especially for end user code
  23. // (that is, some of the .cxx files cannot compile in strict mode, because they
  24. // contain extensions to Standard C++, however their object code forms can
  25. // be used once compiled in relaxed mode, even if the end user code uses
  26. // strict mode).
  27. //
  28. // These changes may also work for some earlier versions of Comeau C++,
  29. // though we have not tested them.
  30. //
  31. // Actual mods made under RedHat 6.1 LINUX, should be ok with SuSE too and
  32. // other LINUX's, and older Caldera LINUX, Solaris/SPARC, SunOS, SCO UNIX,
  33. // and NetBSD. Other platforms may be added. Comeau will also perform
  34. // custom ports for you.
  35. //
  36. // Check libcomo details at http://www.comeaucomputing.com/libcomo and
  37. // http://www.comeaucomputing.com
  38. //
  39. // History of Comeau changes (this is rough, as work was often going on in parallel):
  40. // BETA1 July 14, 2000, Initial port for RedHat 6.1 INTEL/ELF
  41. // BETA2 Aug 4, 2000, Stronger RedHat support
  42. // Support for Comeau strict mode for end user code
  43. // BETA3 Aug 22, 2000, Support for other LINUX/INTEL/ELF's, including older ones
  44. // BETA4 Sept 2, 2000, Initial support for SCO UNIX + other UNIX x86 SVR3's
  45. // Stronger support for end user Comeau strict mode
  46. // BETA5 Oct 5, 2000, Initial support for Solaris/SPARC
  47. // More SCO support (though still incomplete)
  48. // BETA6 Feb 5, 2001, Minor mods to accomodate Comeau C++ 4.2.45.1
  49. // BETA7 Mar 13, 2001, Verified with Comeau C++ 4.2.45.2
  50. // Minor NetBSD support
  51. // BETA8 Apr 1. 2001, Initial support for SunOS/SPARC
  52. // BETA9 Apr 7, 2001, Stronger SCO support + other UNIX x86 SVR3's
  53. // Mods for an fpos_t problem for some LINUXes
  54. // Mods since Destroy did not work in strict mode
  55. // BETA10 Apr 12. 2001, Stronger NetBSD support
  56. //
  57. // PLANNED:
  58. // BETAx TBA TBA, 2001, NetBSD, UNIXWARE, and Windows support expected
  59. //
  60. #ifdef __linux__
  61. # define _STLP_NO_NATIVE_MBSTATE_T 1
  62. # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
  63. # define _STLP_NO_NATIVE_WIDE_STREAMS 1
  64. # define _STLP_NO_LONG_DOUBLE 1
  65. // Comeau C++ under LINUX/INTEL/ELF
  66. // Preprocess away "long long" routines for now, even in relaxed mode
  67. # define __wcstoull_internal_defined 1
  68. # define __wcstoll_internal_defined 1
  69. #endif /* __COMO__ under __linux__ */
  70. #ifdef __USING_x86SVR3x_WITH_COMO /* SCO et al */
  71. /* UNIX 386+ SVR3 mods made with __USING_x86SVR3x_WITH_COMO
  72. in other sources, not here */
  73. # define atan2l atan2
  74. # define cosl cos
  75. # define sinl sin
  76. # define sqrtl sqrt
  77. # include <math.h>
  78. inline long double expl(long double arg) { return exp(arg); }
  79. inline long double logl(long double arg) { return log(arg); }
  80. # define log10l log10
  81. # define sinhl sinh
  82. # define coshl cosh
  83. # define fabsl fabs
  84. namespace std {
  85. inline int min(int a, int b) { return a>b ? b : a; }
  86. }
  87. #endif
  88. #ifdef sun
  89. // Comeau C++ under Solaris/SPARC or SunOS
  90. #ifdef solarissparc
  91. #define __USING_SOLARIS_SPARC_WITH_COMO /* show this in the source when grep'ing for COMO */
  92. // Note comowchar.h for Solaris/SPARC wchar stuff
  93. #include <math.h>
  94. # define sinf sin
  95. # define sinl sin
  96. # define sinhf sinh
  97. # define sinhl sinh
  98. # define cosf cos
  99. # define cosl cos
  100. # define coshf cosh
  101. # define coshl cosh
  102. # define atan2l atan2
  103. # define atan2f atan2
  104. inline float logf(float arg) { return log(arg); }
  105. inline long double logl(long double arg) { return log(arg); }
  106. # define log10f log10
  107. # define log10l log10
  108. # define expf exp
  109. inline long double expl(long double arg) { return exp(arg); }
  110. # define sqrtf sqrt
  111. # define sqrtl sqrt
  112. # define fabsf fabs
  113. # define fabsl fabs
  114. #else
  115. #define __USING_SUNOS_WITH_COMO
  116. #define __unix 1
  117. #define __EXTENSIONS__ /* This might create undue noise somewhere */
  118. #endif
  119. #endif /* sun */
  120. #if defined(__NetBSD__)
  121. // From non-como #ifdef __GNUC__ above
  122. #undef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
  123. #define __unix 1
  124. #include <sys/cdefs.h>
  125. // Some joker #define'd __END_DECLS as };
  126. #undef __END_DECLS
  127. #define __END_DECLS }
  128. // <sys/stat.h> prob
  129. #include <sys/cdefs.h>
  130. #undef __RENAME
  131. #define __RENAME(x)
  132. #define wchar_t __COMO_WCHAR_T
  133. #include <stddef.h>
  134. #undef wchar_t
  135. #include <math.h>
  136. # ifdef BORIS_DISABLED
  137. # define atan2l atan2
  138. # define cosl cos
  139. # define sinl sin
  140. # define sqrtl sqrt
  141. inline long double expl(long double arg) { return exp(arg); }
  142. inline long double logl(long double arg) { return log(arg); }
  143. # define log10l log10
  144. # define sinhl sinh
  145. # define coshl cosh
  146. # define fabsl fabs
  147. # endif
  148. #endif /* __NetBSD__ under __COMO__ */
  149. // Shouldn't need to change anything below here for Comeau C++
  150. // If so, tell us at comeau@comeaucomputing.com
  151. #define _STLP_NO_DRAND48
  152. #define _STLP_PARTIAL_SPECIALIZATION_SYNTAX
  153. #define _STLP_NO_USING_CLAUSE_IN_CLASS
  154. #if __COMO_VERSION__ < 4300
  155. #if __COMO_VERSION__ >= 4245
  156. #define _STLP_NO_EXCEPTION_HEADER /**/
  157. // Is this needed?
  158. # include <stdexcept.stdh>
  159. #endif
  160. #define _STLP_NO_BAD_ALLOC /**/
  161. #define _STLP_USE_AUTO_PTR_CONVERSIONS /**/
  162. #endif
  163. // this one is true only with MS
  164. # if defined (_MSC_VER)
  165. # define _STLP_WCHAR_T_IS_USHORT 1
  166. # if _MSC_VER <= 1200
  167. # define _STLP_VENDOR_GLOBAL_CSTD
  168. # endif
  169. # if _MSC_VER < 1100
  170. # define _STLP_NO_BAD_ALLOC 1
  171. # define _STLP_NO_EXCEPTION_HEADER 1
  172. # define _STLP_NO_NEW_NEW_HEADER 1
  173. # define _STLP_USE_NO_IOSTREAMS 1
  174. # endif
  175. # endif
  176. // # define __EDG_SWITCHES