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