PageRenderTime 29ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 4#define _STLP_PLATFORM "Linux"
 5
 6#include <features.h>
 7
 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
15#endif
16
17#define _STLP_UNIX 1
18
19#if defined(_REENTRANT) && !defined(_PTHREADS)
20# define _PTHREADS
21#endif
22
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
28#    endif
29#    ifndef _STLP_NO_MBSTATE_T
30#      define _STLP_NO_MBSTATE_T
31#    endif
32#    ifndef _STLP_NO_NATIVE_WIDE_STREAMS
33#      define _STLP_NO_NATIVE_WIDE_STREAMS
34#    endif
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
42#  endif
43#endif
44
45
46#if defined(_PTHREADS)
47#  define _STLP_THREADS
48#  define _STLP_PTHREADS
49/*
50#  ifndef __USE_UNIX98
51#    define __USE_UNIX98
52#  endif
53*/
54/* This feature exist at least since glibc 2.2.4 */
55/* #  define __FIT_XSI_THR */ /* Unix 98 or X/Open System Interfaces Extention */
56#  ifdef __USE_XOPEN2K
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
60#   else
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
65#     endif
66#   endif
67/* #   define __FIT_PSHARED_MUTEX */
68#  endif
69#endif
70
71/* Endiannes */
72#include <endian.h>
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!"
75#endif
76
77#if ( __BYTE_ORDER == __LITTLE_ENDIAN )
78#  define _STLP_LITTLE_ENDIAN 1
79#elif ( __BYTE_ORDER == __BIG_ENDIAN )
80#  define _STLP_BIG_ENDIAN 1
81#else
82#  error "__BYTE_ORDER neither __BIG_ENDIAN nor __LITTLE_ENDIAN; Fix me!"
83#endif
84
85#if defined(__GNUC__) && (__GNUC__ < 3)
86#  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
87/*
88#    define _STLP_NO_NATIVE_WIDE_STREAMS   1
89*/
90#endif
91
92
93#endif /* __stl_config__linux_h */