_gcc.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /* STLport configuration file
  2. * It is internal STLport header - DO NOT include it directly
  3. */
  4. #define _STLP_COMPILER "gcc"
  5. #if !defined (_STLP_SGX_CONFIG)
  6. #define _STLP_HAS_INCLUDE_NEXT 1
  7. #endif
  8. #if (__GNUC__ < 2) || ((__GNUC__ < 3) && ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)))
  9. /* We do not support neither the unofficial 2.96 gcc version. */
  10. # error GNU compilers before 2.95 are not supported anymore.
  11. #endif
  12. /* Systems having GLIBC installed have different traits */
  13. #if !defined (_STLP_SGX_CONFIG)
  14. #if defined (__linux__)
  15. # ifndef _STLP_USE_GLIBC
  16. # define _STLP_USE_GLIBC 1
  17. # endif
  18. # if defined (__UCLIBC__) && !defined (_STLP_USE_UCLIBC)
  19. # define _STLP_USE_UCLIBC 1
  20. # endif
  21. #endif
  22. #endif
  23. #if defined (__CYGWIN__) && \
  24. (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3) && !defined (_GLIBCPP_USE_C99)
  25. # define _STLP_NO_VENDOR_MATH_L
  26. # define _STLP_NO_VENDOR_STDLIB_L
  27. #endif
  28. #if (__GNUC__ < 3)
  29. # define _STLP_NO_VENDOR_STDLIB_L
  30. #endif
  31. #if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4))
  32. /* define for gcc versions before 3.4.0. */
  33. # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
  34. #endif
  35. #if !defined (_REENTRANT) && (defined (_THREAD_SAFE) || \
  36. (defined (__OpenBSD__) && defined (_POSIX_THREADS)) || \
  37. (defined (__MINGW32__) && defined (_MT)))
  38. # define _REENTRANT
  39. #endif
  40. #if defined (__DJGPP)
  41. # define _STLP_RAND48 1
  42. # define _NOTHREADS 1
  43. # undef _PTHREADS
  44. # define _STLP_LITTLE_ENDIAN
  45. #endif
  46. #if defined (__MINGW32__)
  47. /* Mingw32, egcs compiler using the Microsoft C runtime */
  48. # if (__GNUC__ >= 3)
  49. /* For gcc before version 3 this macro is defined below */
  50. # define _STLP_VENDOR_GLOBAL_CSTD
  51. # endif
  52. # undef _STLP_NO_DRAND48
  53. # define _STLP_NO_DRAND48
  54. # define _STLP_CALL
  55. #endif /* __MINGW32__ */
  56. #if defined (__CYGWIN__) || defined (__MINGW32__)
  57. # if !defined (_STLP_USE_STATIC_LIB)
  58. # define _STLP_USE_DECLSPEC 1
  59. # if !defined (_STLP_USE_DYNAMIC_LIB)
  60. # define _STLP_USE_DYNAMIC_LIB
  61. # endif
  62. # define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
  63. # define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
  64. # define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
  65. # endif
  66. /* The following is defined independently of _STLP_USE_STATIC_LIB because it is also
  67. * used to import symbols from PSDK under MinGW
  68. */
  69. # define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
  70. #else
  71. # if (__GNUC__ >= 4)
  72. # if !defined (_STLP_USE_STATIC_LIB)
  73. # if !defined (_STLP_USE_DYNAMIC_LIB)
  74. # define _STLP_USE_DYNAMIC_LIB
  75. # endif
  76. # define _STLP_USE_DECLSPEC 1
  77. # define _STLP_EXPORT_DECLSPEC __attribute__((visibility("default")))
  78. # define _STLP_IMPORT_DECLSPEC __attribute__((visibility("default")))
  79. # define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((visibility("default")))
  80. # define _STLP_CLASS_IMPORT_DECLSPEC __attribute__((visibility("default")))
  81. # endif
  82. # endif
  83. #endif
  84. #if !defined (_STLP_SGX_CONFIG)
  85. #if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun) || defined(__APPLE__))
  86. # if !defined (__MINGW32__) && !defined (__CYGWIN__)
  87. # define _STLP_NO_NATIVE_MBSTATE_T 1
  88. # endif
  89. # if !defined (__MINGW32__) || (__GNUC__ < 3) || (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)
  90. # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
  91. # endif
  92. # define _STLP_NO_NATIVE_WIDE_STREAMS 1
  93. #endif
  94. #endif /* _STLP_SGX_CONFIG */
  95. #define _STLP_NORETURN_FUNCTION __attribute__((noreturn))
  96. /* Mac OS X is a little different with namespaces and cannot instantiate
  97. * static data members in template classes */
  98. #if defined (__APPLE__)
  99. # if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
  100. /* Mac OS X is missing a required typedef and standard macro */
  101. typedef unsigned int wint_t;
  102. # endif
  103. # define __unix
  104. # define _STLP_NO_LONG_DOUBLE
  105. /* Mac OS X needs all "::" scope references to be "std::" */
  106. # define _STLP_USE_NEW_C_HEADERS
  107. # define _STLP_NO_VENDOR_STDLIB_L
  108. #endif /* __APPLE__ */
  109. /* g++ 2.7.x and above */
  110. #define _STLP_LONG_LONG long long
  111. #ifdef _STLP_USE_UCLIBC
  112. /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
  113. # define _STLP_NO_VENDOR_MATH_F
  114. /* No *l math fuctions variants (i.e. sqrtl, fabsl, etc.) */
  115. # define _STLP_NO_VENDOR_MATH_L
  116. # define _STLP_NO_LONG_DOUBLE
  117. #endif
  118. #if defined (__OpenBSD__) || defined (__FreeBSD__)
  119. # define _STLP_NO_VENDOR_MATH_L
  120. # define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
  121. # ifndef __unix
  122. # define __unix
  123. # endif
  124. #endif
  125. #if defined (__alpha__)
  126. # define _STLP_NO_VENDOR_MATH_L
  127. #endif
  128. #if defined (__hpux)
  129. # define _STLP_VENDOR_GLOBAL_CSTD 1
  130. # define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
  131. /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
  132. # define _STLP_NO_VENDOR_MATH_F
  133. #endif
  134. #if (__GNUC__ >= 3)
  135. # ifndef _STLP_HAS_NO_NEW_C_HEADERS
  136. /*
  137. # ifndef _STLP_USE_UCLIBC
  138. */
  139. # define _STLP_HAS_NATIVE_FLOAT_ABS
  140. /*
  141. # endif
  142. */
  143. # else
  144. # ifdef _STLP_USE_GLIBC
  145. # define _STLP_VENDOR_LONG_DOUBLE_MATH 1
  146. # endif
  147. # endif
  148. #endif
  149. #if (__GNUC__ < 3)
  150. # define _STLP_HAS_NO_NEW_C_HEADERS 1
  151. # define _STLP_VENDOR_GLOBAL_CSTD 1
  152. # define _STLP_DONT_USE_PTHREAD_SPINLOCK 1
  153. # ifndef __HONOR_STD
  154. # define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
  155. # endif
  156. /* egcs fails to initialize builtin types in expr. like this : new(p) char(); */
  157. # define _STLP_DEF_CONST_PLCT_NEW_BUG 1
  158. #endif
  159. #undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
  160. #undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
  161. /* strict ANSI prohibits "long long" ( gcc) */
  162. #if defined ( __STRICT_ANSI__ )
  163. # undef _STLP_LONG_LONG
  164. #endif
  165. #ifndef __EXCEPTIONS
  166. # undef _STLP_DONT_USE_EXCEPTIONS
  167. # define _STLP_DONT_USE_EXCEPTIONS 1
  168. #endif
  169. #if (__GNUC__ >= 3)
  170. /* Instantiation scheme that used (default) in gcc 3 made void of sense explicit
  171. instantiation within library: nothing except increased library size. - ptr
  172. */
  173. # define _STLP_NO_FORCE_INSTANTIATE
  174. #endif