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