ossrv_pub/configuration/inc/stdapis/stlport/config/stl_watcom.h
changeset 31 ce057bb09d0b
child 34 5fae379060a7
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 // STLport configuration file
       
    18 // It is internal STLport header - DO NOT include it directly
       
    19 
       
    20 # ifndef _STLP_NO_OWN_IOSTREAMS 
       
    21 #  define _STLP_NO_OWN_IOSTREAMS
       
    22 # endif
       
    23 
       
    24 # define _STLP_NO_RELOPS_NAMESPACE
       
    25 # define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
       
    26 
       
    27 #  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
       
    28 #  define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
       
    29 #  define _STLP_USE_OLD_HP_ITERATOR_QUERIES
       
    30 
       
    31 // On QNX, headers are supposed to be found in /usr/include,
       
    32 // so default "../include" should work.
       
    33 # ifndef __QNX__
       
    34 #  define _STLP_NATIVE_INCLUDE_PATH ../h
       
    35 # endif
       
    36 
       
    37 // Inline replacements for locking calls under Watcom
       
    38 // Define _STLP_NO_WATCOM_INLINE_INTERLOCK to keep using
       
    39 // standard WIN32 calls
       
    40 // Define _STL_MULTIPROCESSOR to enable lock
       
    41 #if !defined(_STLP_NO_WATCOM_INLINE_INTERLOCK)
       
    42 
       
    43 long    __stl_InterlockedIncrement( long *var );
       
    44 long    __stl_InterlockedDecrement( long *var );
       
    45 
       
    46 #ifdef _STL_MULTIPROCESSOR
       
    47 // Multiple Processors, add lock prefix
       
    48 #pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
       
    49         ".586"                  \
       
    50         "mov eax, 1"            \
       
    51         "lock xadd [ecx], eax"       \
       
    52         "inc eax"               \
       
    53         value [eax];
       
    54 
       
    55         
       
    56 #pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
       
    57         ".586"                  \
       
    58         "mov eax, 0FFFFFFFFh"   \
       
    59         "lock xadd [ecx], eax"       \
       
    60         "dec eax"               \
       
    61         value [eax];
       
    62 #else 
       
    63 // Single Processor, lock prefix not needed
       
    64 #pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
       
    65         ".586"                  \
       
    66         "mov eax, 1"            \
       
    67         "xadd [ecx], eax"       \
       
    68         "inc eax"               \
       
    69         value [eax];
       
    70         
       
    71 #pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
       
    72         ".586"                  \
       
    73         "mov eax, 0FFFFFFFFh"   \
       
    74         "xadd [ecx], eax"       \
       
    75         "dec eax"               \
       
    76         value [eax];
       
    77 #endif // _STL_MULTIPROCESSOR
       
    78 
       
    79 long    __stl_InterlockedExchange( long *Destination, long Value );
       
    80                 
       
    81 // xchg has auto-lock
       
    82 #pragma aux __stl_InterlockedExchange parm [ecx] [eax] = \
       
    83         ".586"                  \
       
    84         "xchg eax, [ecx]"       \
       
    85         value [eax];
       
    86 #else
       
    87 
       
    88 #define __stl_InterlockedIncrement      InterlockedIncrement
       
    89 #define __stl_InterlockedDecrement      InterlockedDecrement
       
    90 #define __stl_InterlockedExchange       InterlockedExchange
       
    91 #endif /* INLINE INTERLOCK */
       
    92 
       
    93 #define _STLP_ATOMIC_INCREMENT(__x) __stl_InterlockedIncrement((long*)__x)
       
    94 #define _STLP_ATOMIC_DECREMENT(__x) __stl_InterlockedDecrement((long*)__x)
       
    95 #define _STLP_ATOMIC_EXCHANGE(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y)
       
    96 
       
    97 // boris : is this true or just the header is not in /usr/include ?
       
    98 # ifdef __QNX__
       
    99 #  define _STLP_NO_TYPEINFO 1
       
   100 # endif
       
   101 
       
   102 #  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
       
   103 #  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
       
   104 #  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
       
   105 #  define _STLP_NO_MEMBER_TEMPLATES 1
       
   106 #  define _STLP_NO_FRIEND_TEMPLATES 1
       
   107 #  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
       
   108 
       
   109 
       
   110 #  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
       
   111 #  define _STLP_HAS_NO_NAMESPACES 1
       
   112 #  define _STLP_NEED_TYPENAME 1
       
   113 
       
   114 #  if __WATCOMC__ < 1100
       
   115 #  define _STLP_NO_WCHAR_T 1
       
   116 #  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
       
   117 #  endif
       
   118 
       
   119 #  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
       
   120 
       
   121 #  define _STLP_STATIC_CONST_INIT_BUG 1
       
   122 // #  define _STLP_THROW_RETURN_BUG 1
       
   123 #  define _STLP_NO_TEMPLATE_CONVERSIONS 1
       
   124 
       
   125 #  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
       
   126 
       
   127 #  define _STLP_HAS_NO_NEW_IOSTREAMS 1
       
   128 #  define _STLP_HAS_NO_NEW_C_HEADERS 1
       
   129 #  define _STLP_NO_NEW_NEW_HEADER 1
       
   130 #  define _STLP_VENDOR_GLOBAL_STD
       
   131 
       
   132 #  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
       
   133 #  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
       
   134 #  define _STLP_NONTEMPL_BASE_MATCH_BUG
       
   135 #  define _STLP_NO_EXCEPTION_HEADER 1
       
   136 #  define _STLP_NO_BAD_ALLOC 1
       
   137 
       
   138 #  define _STLP_NESTED_TYPE_PARAM_BUG 1
       
   139 
       
   140 #  define _STLP_NO_CSTD_FUNCTION_IMPORTS 1
       
   141 
       
   142 #  if (__WATCOM_CPLUSPLUS__ < 1100 )
       
   143 #   define _STLP_NO_BOOL 1
       
   144 #   define _STLP_NEED_EXPLICIT 1
       
   145 #   define _STLP_NEED_MUTABLE 1
       
   146 #   define _STLP_NO_ARROW_OPERATOR 1
       
   147 #  endif
       
   148 // This one is present in 11, but apparently has bugs (with auto_ptr).
       
   149 #   define _STLP_NO_NEW_STYLE_CASTS 1
       
   150 
       
   151 // Get rid of Watcom's min and max macros 
       
   152 #undef min 
       
   153 #undef max
       
   154 
       
   155 // for switches (-xs,  -xss,  -xst)
       
   156 //
       
   157 #if !(defined (__SW_XS) || defined (__SW_XSS) || defined(__SW_XST))
       
   158 #    define _STLP_HAS_NO_EXCEPTIONS 1
       
   159 # endif
       
   160 
       
   161 # if defined ( _MT ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
       
   162 # define _REENTRANT 1
       
   163 # endif
       
   164 
       
   165 
       
   166 
       
   167 
       
   168