1 #ifndef __stl_config__linux_h
2 #define __stl_config__linux_h
4 #define _STLP_PLATFORM "Linux"
8 /* This is defined wether library in use is glibc or not.
9 This may be treated as presence of GNU libc compatible
10 header files (these define is not really intended to check
11 for the presence of a particular library, but rather is used
12 to define an INTERFACE.) */
13 #ifndef _STLP_USE_GLIBC
14 # define _STLP_USE_GLIBC 1
19 #if defined(_REENTRANT) && !defined(_PTHREADS)
23 #ifdef __UCLIBC__ /* uClibc 0.9.27 */
24 # define _STLP_USE_UCLIBC 1
25 # if !defined(__UCLIBC_HAS_WCHAR__)
26 # ifndef _STLP_NO_WCHAR_T
27 # define _STLP_NO_WCHAR_T
29 # ifndef _STLP_NO_MBSTATE_T
30 # define _STLP_NO_MBSTATE_T
32 # ifndef _STLP_NO_NATIVE_WIDE_STREAMS
33 # define _STLP_NO_NATIVE_WIDE_STREAMS
35 # endif /* __UCLIBC_HAS_WCHAR__ */
36 /* Hmm, bogus _GLIBCPP_USE_NAMESPACES seems undefined... */
37 # define _STLP_VENDOR_GLOBAL_CSTD 1
38 # if defined(_STLP_REAL_LOCALE_IMPLEMENTED)
39 /* locale in uClibc is very restricted */
40 /* recheck if __UCLIBC_HAS_LOCALE__ defined...*/
41 # undef _STLP_REAL_LOCALE_IMPLEMENTED
46 #if defined(_PTHREADS)
47 # define _STLP_THREADS
48 # define _STLP_PTHREADS
54 /* This feature exist at least since glibc 2.2.4 */
55 /* # define __FIT_XSI_THR */ /* Unix 98 or X/Open System Interfaces Extention */
57 /* The IEEE Std. 1003.1j-2000 introduces functions to implement spinlocks. */
58 # ifndef __UCLIBC__ /* There are no spinlocks in uClibc 0.9.27 */
59 # define _STLP_USE_PTHREAD_SPINLOCK
61 # ifndef _STLP_DONT_USE_PTHREAD_SPINLOCK
62 /* in uClibc (0.9.26) pthread_spinlock* declared in headers
63 * but absent in library */
64 # define _STLP_DONT_USE_PTHREAD_SPINLOCK
67 /* # define __FIT_PSHARED_MUTEX */
73 #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
74 # error "One of __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN undefined; Fix me!"
77 #if ( __BYTE_ORDER == __LITTLE_ENDIAN )
78 # define _STLP_LITTLE_ENDIAN 1
79 #elif ( __BYTE_ORDER == __BIG_ENDIAN )
80 # define _STLP_BIG_ENDIAN 1
82 # error "__BYTE_ORDER neither __BIG_ENDIAN nor __LITTLE_ENDIAN; Fix me!"
85 #if defined(__GNUC__) && (__GNUC__ < 3)
86 # define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
88 # define _STLP_NO_NATIVE_WIDE_STREAMS 1
93 #endif /* __stl_config__linux_h */