1// STLport configuration file 2// It is internal STLport header - DO NOT include it directly 3 4#define _STLP_COMPILER "Watcom" 5 6#if (__WATCOMC__ < 1250) 7# error Not supported! 8#endif 9 10#ifndef _CPPRTTI 11# define _STLP_NO_RTTI 1 12#endif 13 14// for switches (-xs, -xss, -xst) 15#if !(defined (__SW_XS) || defined (__SW_XSS) || defined(__SW_XST)) 16# define _STLP_HAS_NO_EXCEPTIONS 1 17#endif 18 19#if defined (_MT) && !defined (_NOTHREADS) 20# define _STLP_THREADS 1 21#endif 22 23#define _STLP_NO_VENDOR_STDLIB_L 24#define _STLP_NO_VENDOR_MATH_F 25#define _STLP_NO_VENDOR_MATH_L 26 27#define _STLP_LONG_LONG long long 28 29#define _STLP_CALL __cdecl 30#define _STLP_IMPORT_DECLSPEC __declspec(dllimport) 31 32#define _STLP_NO_CONST_IN_PAIR 33 34//#define _STLP_DONT_USE_PRIV_NAMESPACE 35//#define _STLP_NO_MOVE_SEMANTIC 36//#define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER 37#define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 38 39#define _STLP_NO_RELOPS_NAMESPACE 40 41#define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS 42#define _STLP_NO_STATIC_CONST_DEFINITION 43 44//#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 45#define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS 46//#define _STLP_USE_OLD_HP_ITERATOR_QUERIES 47 48#define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 49#define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 50//#define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 51//#define _STLP_NO_MEMBER_TEMPLATES 1 52//#define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 53 54//#define _STLP_LIMITED_DEFAULT_TEMPLATES 1 55//#define _STLP_HAS_NO_NAMESPACES 1 56//#define _STLP_NEED_TYPENAME 1 57 58#define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 59 60//#define _STLP_STATIC_CONST_INIT_BUG 1 61// #define _STLP_THROW_RETURN_BUG 1 62//#define _STLP_NO_TEMPLATE_CONVERSIONS 1 63 64#define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1 65 66#define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 67#define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 68 69//#define _STLP_NONTEMPL_BASE_MATCH_BUG 70//#define _STLP_NO_EXCEPTION_HEADER 1 71#define _STLP_NO_BAD_ALLOC 1 72 73//#define _STLP_NO_TYPENAME_ON_RETURN_TYPE 74//#define _STLP_NESTED_TYPE_PARAM_BUG 1 75 76//#define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1 77 78#define _STLP_NO_ARROW_OPERATOR 1 79// This one is present in 11, but apparently has bugs (with auto_ptr). 80//#define _STLP_NO_NEW_STYLE_CASTS 1 81 82// Get rid of Watcom's min and max macros 83#undef min 84#undef max 85 86// On QNX, headers are supposed to be found in /usr/include, 87// so default "../include" should work. 88#ifndef __QNX__ 89# define _STLP_NATIVE_INCLUDE_PATH ../h 90#else 91// boris : is this true or just the header is not in /usr/include ? 92# define _STLP_NO_TYPEINFO 1 93#endif 94 95// Inline replacements for locking calls under Watcom 96// Define _STLP_NO_WATCOM_INLINE_INTERLOCK to keep using 97// standard WIN32 calls 98// Define _STL_MULTIPROCESSOR to enable lock 99#define _STLP_NO_WATCOM_INLINE_INTERLOCK 100#if !defined(_STLP_NO_WATCOM_INLINE_INTERLOCK) 101 102long __stl_InterlockedIncrement( long *var ); 103long __stl_InterlockedDecrement( long *var ); 104 105#ifdef _STL_MULTIPROCESSOR 106// Multiple Processors, add lock prefix 107#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \ 108 ".586" \ 109 "mov eax, 1" \ 110 "lock xadd [ecx], eax" \ 111 "inc eax" \ 112 value [eax]; 113 114 115#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \ 116 ".586" \ 117 "mov eax, 0FFFFFFFFh" \ 118 "lock xadd [ecx], eax" \ 119 "dec eax" \ 120 value [eax]; 121#else 122// Single Processor, lock prefix not needed 123#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \ 124 ".586" \ 125 "mov eax, 1" \ 126 "xadd [ecx], eax" \ 127 "inc eax" \ 128 value [eax]; 129 130#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \ 131 ".586" \ 132 "mov eax, 0FFFFFFFFh" \ 133 "xadd [ecx], eax" \ 134 "dec eax" \ 135 value [eax]; 136#endif // _STL_MULTIPROCESSOR 137 138long __stl_InterlockedExchange( long *Destination, long Value ); 139 140// xchg has auto-lock 141#pragma aux __stl_InterlockedExchange parm [ecx] [eax] = \ 142 ".586" \ 143 "xchg eax, [ecx]" \ 144 value [eax]; 145 146# define _STLP_ATOMIC_INCREMENT(__x) __stl_InterlockedIncrement((long*)__x) 147# define _STLP_ATOMIC_DECREMENT(__x) __stl_InterlockedDecrement((long*)__x) 148# define _STLP_ATOMIC_EXCHANGE(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y) 149# define _STLP_ATOMIC_EXCHANGE_PTR(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y) 150#endif /* INLINE INTERLOCK */ 151 152