/home/ntakagi/work/STLport-5.1.5/stlport/stl/config/_linux.h

Go to the documentation of this file.
00001 #ifndef __stl_config__linux_h
00002 #define __stl_config__linux_h
00003 
00004 #define _STLP_PLATFORM "Linux"
00005 
00006 #include <features.h>
00007 
00008 /* This is defined wether library in use is glibc or not.
00009    This may be treated as presence of GNU libc compatible
00010    header files (these define is not really intended to check
00011    for the presence of a particular library, but rather is used
00012    to define an INTERFACE.) */
00013 #ifndef _STLP_USE_GLIBC
00014 #  define _STLP_USE_GLIBC 1
00015 #endif
00016 
00017 #define _STLP_UNIX 1
00018 
00019 #if defined(_REENTRANT) && !defined(_PTHREADS)
00020 # define _PTHREADS
00021 #endif
00022 
00023 #ifdef __UCLIBC__ /* uClibc 0.9.27 */
00024 #  define _STLP_USE_UCLIBC 1
00025 #  if !defined(__UCLIBC_HAS_WCHAR__)
00026 #    ifndef _STLP_NO_WCHAR_T
00027 #      define _STLP_NO_WCHAR_T
00028 #    endif
00029 #    ifndef _STLP_NO_MBSTATE_T
00030 #      define _STLP_NO_MBSTATE_T
00031 #    endif
00032 #    ifndef _STLP_NO_NATIVE_WIDE_STREAMS
00033 #      define _STLP_NO_NATIVE_WIDE_STREAMS
00034 #    endif
00035 #  endif /* __UCLIBC_HAS_WCHAR__ */
00036    /* Hmm, bogus _GLIBCPP_USE_NAMESPACES seems undefined... */
00037 #  define _STLP_VENDOR_GLOBAL_CSTD 1
00038 #  if defined(_STLP_REAL_LOCALE_IMPLEMENTED)
00039      /* locale in uClibc is very restricted */
00040      /* recheck if __UCLIBC_HAS_LOCALE__ defined...*/
00041 #    undef _STLP_REAL_LOCALE_IMPLEMENTED
00042 #  endif
00043 #endif
00044 
00045 
00046 #if defined(_PTHREADS)
00047 #  define _STLP_THREADS
00048 #  define _STLP_PTHREADS
00049 /*
00050 #  ifndef __USE_UNIX98
00051 #    define __USE_UNIX98
00052 #  endif
00053 */
00054 /* This feature exist at least since glibc 2.2.4 */
00055 /* #  define __FIT_XSI_THR */ /* Unix 98 or X/Open System Interfaces Extention */
00056 #  ifdef __USE_XOPEN2K
00057 /* The IEEE Std. 1003.1j-2000 introduces functions to implement spinlocks. */
00058 #   ifndef __UCLIBC__ /* There are no spinlocks in uClibc 0.9.27 */
00059 #     define _STLP_USE_PTHREAD_SPINLOCK
00060 #   else
00061 #     ifndef _STLP_DONT_USE_PTHREAD_SPINLOCK
00062         /* in uClibc (0.9.26) pthread_spinlock* declared in headers
00063          * but absent in library */
00064 #       define _STLP_DONT_USE_PTHREAD_SPINLOCK
00065 #     endif
00066 #   endif
00067 /* #   define __FIT_PSHARED_MUTEX */
00068 #  endif
00069 #endif
00070 
00071 /* Endiannes */
00072 #include <endian.h>
00073 #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
00074 #  error "One of __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN undefined; Fix me!"
00075 #endif
00076 
00077 #if ( __BYTE_ORDER == __LITTLE_ENDIAN )
00078 #  define _STLP_LITTLE_ENDIAN 1
00079 #elif ( __BYTE_ORDER == __BIG_ENDIAN )
00080 #  define _STLP_BIG_ENDIAN 1
00081 #else
00082 #  error "__BYTE_ORDER neither __BIG_ENDIAN nor __LITTLE_ENDIAN; Fix me!"
00083 #endif
00084 
00085 #if defined(__GNUC__) && (__GNUC__ < 3)
00086 #  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
00087 /*
00088 #    define _STLP_NO_NATIVE_WIDE_STREAMS   1
00089 */
00090 #endif
00091 
00092 
00093 #endif /* __stl_config__linux_h */



Generated on Mon Mar 10 15:32:46 2008 by  doxygen 1.5.1