/project/jni/stlport/stlport/stl/config/_linux.h

https://github.com/aichunyu/FFPlayer · C Header · 93 lines · 57 code · 13 blank · 23 comment · 8 complexity · e7d72ebee7875b3263bd545b36525fda MD5 · raw file

  1. #ifndef __stl_config__linux_h
  2. #define __stl_config__linux_h
  3. #define _STLP_PLATFORM "Linux"
  4. #include <features.h>
  5. /* This is defined wether library in use is glibc or not.
  6. This may be treated as presence of GNU libc compatible
  7. header files (these define is not really intended to check
  8. for the presence of a particular library, but rather is used
  9. to define an INTERFACE.) */
  10. #ifndef _STLP_USE_GLIBC
  11. # define _STLP_USE_GLIBC 1
  12. #endif
  13. #define _STLP_UNIX 1
  14. #if defined(_REENTRANT) && !defined(_PTHREADS)
  15. # define _PTHREADS
  16. #endif
  17. #ifdef __UCLIBC__ /* uClibc 0.9.27 */
  18. # define _STLP_USE_UCLIBC 1
  19. # if !defined(__UCLIBC_HAS_WCHAR__)
  20. # ifndef _STLP_NO_WCHAR_T
  21. # define _STLP_NO_WCHAR_T
  22. # endif
  23. # ifndef _STLP_NO_MBSTATE_T
  24. # define _STLP_NO_MBSTATE_T
  25. # endif
  26. # ifndef _STLP_NO_NATIVE_WIDE_STREAMS
  27. # define _STLP_NO_NATIVE_WIDE_STREAMS
  28. # endif
  29. # endif /* __UCLIBC_HAS_WCHAR__ */
  30. /* Hmm, bogus _GLIBCPP_USE_NAMESPACES seems undefined... */
  31. # define _STLP_VENDOR_GLOBAL_CSTD 1
  32. # if defined(_STLP_REAL_LOCALE_IMPLEMENTED)
  33. /* locale in uClibc is very restricted */
  34. /* recheck if __UCLIBC_HAS_LOCALE__ defined...*/
  35. # undef _STLP_REAL_LOCALE_IMPLEMENTED
  36. # endif
  37. #endif
  38. #if defined(_PTHREADS)
  39. # define _STLP_THREADS
  40. # define _STLP_PTHREADS
  41. /*
  42. # ifndef __USE_UNIX98
  43. # define __USE_UNIX98
  44. # endif
  45. */
  46. /* This feature exist at least since glibc 2.2.4 */
  47. /* # define __FIT_XSI_THR */ /* Unix 98 or X/Open System Interfaces Extention */
  48. # ifdef __USE_XOPEN2K
  49. /* The IEEE Std. 1003.1j-2000 introduces functions to implement spinlocks. */
  50. # ifndef __UCLIBC__ /* There are no spinlocks in uClibc 0.9.27 */
  51. # define _STLP_USE_PTHREAD_SPINLOCK
  52. # else
  53. # ifndef _STLP_DONT_USE_PTHREAD_SPINLOCK
  54. /* in uClibc (0.9.26) pthread_spinlock* declared in headers
  55. * but absent in library */
  56. # define _STLP_DONT_USE_PTHREAD_SPINLOCK
  57. # endif
  58. # endif
  59. /* # define __FIT_PSHARED_MUTEX */
  60. # endif
  61. #endif
  62. /* Endiannes */
  63. #include <endian.h>
  64. #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
  65. # error "One of __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN undefined; Fix me!"
  66. #endif
  67. #if ( __BYTE_ORDER == __LITTLE_ENDIAN )
  68. # define _STLP_LITTLE_ENDIAN 1
  69. #elif ( __BYTE_ORDER == __BIG_ENDIAN )
  70. # define _STLP_BIG_ENDIAN 1
  71. #else
  72. # error "__BYTE_ORDER neither __BIG_ENDIAN nor __LITTLE_ENDIAN; Fix me!"
  73. #endif
  74. #if defined(__GNUC__) && (__GNUC__ < 3)
  75. # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
  76. /*
  77. # define _STLP_NO_NATIVE_WIDE_STREAMS 1
  78. */
  79. #endif
  80. #endif /* __stl_config__linux_h */