1.1 --- a/epoc32/include/tools/stlport/stl/config/_evc.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/tools/stlport/stl/config/_evc.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,354 +1,354 @@
1.4 -/*
1.5 - * File to have Microsoft eMbedded Visual C++ 3.0 and .NET working with STLport
1.6 - * May 2004
1.7 - * Origin : Zdenek Nemec - zero@mapfactor.com
1.8 - * Michael Fink - vividos@users.sourceforge.net
1.9 - */
1.10 -
1.11 -#ifndef _STLP_EVC_H
1.12 -#define _STLP_EVC_H
1.13 -
1.14 -#define _STLP_COMPILER "eMbedded Visual C++"
1.15 -
1.16 -// This flag is being used by STLport to support
1.17 -// old-fashioned Windows CE SDK (see stl_wince.h)
1.18 -// do not use with eMebedded Visual C++ 3 or 4!
1.19 -#ifdef _STLP_WINCE
1.20 -# undef _STLP_WINCE
1.21 -#endif
1.22 -
1.23 -/* Compiler dependent define. The following defines may be available:
1.24 - * _STLP_WCE_EVC3 when compiling under eMbedded Visual C++ 3
1.25 - * _STLP_WCE_NET when compiling under eMbedded Visual C++ .NET
1.26 - * _STLP_WCE always defined when compiling with one of the above
1.27 - */
1.28 -#undef _STLP_WCE_EVC3
1.29 -#undef _STLP_WCE_NET
1.30 -
1.31 -#if (_WIN32_WCE > 300)
1.32 -# define _STLP_WCE_NET UNDER_CE
1.33 -#elif (_WIN32_WCE == 300)
1.34 -# define _STLP_WCE_EVC3 UNDER_CE
1.35 -#else
1.36 -# error No support for Windows CE below 3.0!
1.37 -#endif
1.38 -
1.39 -// This is defined for all platforms using Windows CE
1.40 -#define _STLP_WCE
1.41 -
1.42 -/* All Windows CE versions up to at least version 5 are little-endian, even
1.43 - * if the hardware (like e.g. MIPS) can be configured for big-endian, too. */
1.44 -#define _STLP_LITTLE_ENDIAN
1.45 -
1.46 -// Ensure _DEBUG is defined.
1.47 -#if defined (DEBUG) && !defined (_DEBUG)
1.48 -# define _DEBUG
1.49 -#endif
1.50 -
1.51 -// in evc3/4, on ARM, check that _STLP_DEBUG is not defined
1.52 -// the ARM compiler has a bug that prevents that debug mode from working
1.53 -#if _WIN32_WCE < 500 && defined(ARM) && defined(_STLP_DEBUG)
1.54 -# error _STLP_DEBUG mode is not supported in evc3 and evc4 on the ARM platform!
1.55 -#endif
1.56 -
1.57 -// inherit all msvc6 options
1.58 -#include <stl/config/_msvc.h>
1.59 -
1.60 -// CE up to at least version 5 has no C locale support
1.61 -#define _STLP_NO_LOCALE_SUPPORT
1.62 -
1.63 -#if _WIN32_WCE >= 0x500
1.64 - // SDKs built with PB5 have terminate&co in namespace std...
1.65 -# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_STD
1.66 -# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_STD
1.67 - // ...and new_handler/set_new_handler in the global namespace.
1.68 -# define _STLP_GLOBAL_NEW_HANDLER 1
1.69 -#endif
1.70 -
1.71 -// Always threaded in eMbedded Visual C++ 3.0 and .NET
1.72 -#ifndef _MT
1.73 -# define _MT
1.74 -#endif
1.75 -
1.76 -// we don't have a static native runtime library
1.77 -#undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
1.78 -
1.79 -#if _WIN32_WCE < 400
1.80 -// no long double under CE3 and older
1.81 -# define _STLP_NO_LONG_DOUBLE
1.82 -#endif
1.83 -
1.84 -// no *f and *l math functions available
1.85 -#define _STLP_NO_VENDOR_MATH_F
1.86 -#define _STLP_NO_VENDOR_MATH_L
1.87 -
1.88 -/*
1.89 - * Redirect cout, cerr and clog:
1.90 - * If defined redirect cout, cerr and clog to
1.91 - * files stdout.txt, stderr.txt and stdlog.txt
1.92 - */
1.93 -//# define _STLP_REDIRECT_STDSTREAMS
1.94 -
1.95 -/*
1.96 - * Static class members may generate LNK1179:
1.97 - * Wrong COMDAT packing may cause LNK1179 error.
1.98 - * For details see http://groups.google.com/groups?th=8a05c82c4ffee280
1.99 - * example P78. This define is not used/needed at this moment
1.100 - * but may came handy in future...
1.101 - */
1.102 -//# define _STLP_STATIC_MEMBERS_BUG
1.103 -
1.104 -// Use wide-string interface of windows native functions (CreateFile...).
1.105 -// Note that this should be defined all the time while under CE.
1.106 -#if defined (UNICODE)
1.107 -# define _STLP_USE_WIDE_INTERFACE
1.108 -#endif
1.109 -
1.110 -// Force exception std to std instead of __std_alias.
1.111 -#if defined (__cplusplus) && !defined (_STLP_HAS_NO_NAMESPACES)
1.112 -# ifdef _STLP_VENDOR_EXCEPT_STD
1.113 -# undef _STLP_VENDOR_EXCEPT_STD
1.114 -# endif
1.115 -# define _STLP_VENDOR_EXCEPT_STD std
1.116 -#endif
1.117 -
1.118 -// short string optimization bug under evc3, evc4 using ARM compiler
1.119 -#if _MSC_VER<1400 && (defined (ARM) || defined (_ARM_))
1.120 -# define _STLP_DONT_USE_SHORT_STRING_OPTIM
1.121 -#endif
1.122 -
1.123 -// when using MFC, disable another placement new declaration, since there is one in wcealt.h
1.124 -#if !defined (__BUILDING_STLPORT) && defined (_MFC_VER)
1.125 -# define __PLACEMENT_NEW_INLINE
1.126 -#endif
1.127 -
1.128 -// threads
1.129 -#undef _REENTRANT
1.130 -#define _REENTRANT
1.131 -#undef _NOTHREADS
1.132 -
1.133 -// Use old fashioned headers (ctime vs. time.h).
1.134 -#undef _STLP_NO_NEW_C_HEADERS
1.135 -#define _STLP_NO_NEW_C_HEADERS
1.136 -
1.137 -// exception handling support: only on evc4 and user added /GX to project settings
1.138 -#if defined (_STLP_WCE_EVC3) || !defined (_CPPUNWIND)
1.139 -# define _STLP_NO_EXCEPTION_HEADER
1.140 -# define _STLP_NO_EXCEPTIONS
1.141 -# undef _STLP_USE_EXCEPTIONS
1.142 -# ifndef __THROW_BAD_ALLOC
1.143 -# define __THROW_BAD_ALLOC { _STLP_WINCE_TRACE(L"out of memory"); ExitThread(1); }
1.144 -# endif
1.145 -#endif
1.146 -
1.147 -#define _STLP_WINCE_TRACE(msg) OutputDebugString(msg)
1.148 -
1.149 -/*
1.150 - * eMbedded Visual C++ .NET specific settings
1.151 - */
1.152 -#if defined (_STLP_WCE_NET)
1.153 -
1.154 -// evc4 has no locale and time support
1.155 -# define _STLP_NO_LOCALE_SUPPORT
1.156 -# define _STLP_NO_TIME_SUPPORT
1.157 -
1.158 -// ptrdiff_t is not defined in evc4 headers
1.159 -# ifndef _PTRDIFF_T_DEFINED
1.160 - typedef int ptrdiff_t;
1.161 -# define _PTRDIFF_T_DEFINED
1.162 -# endif
1.163 -
1.164 -/*
1.165 - * Helper macros for including the native headers in cases where a file with
1.166 - * the same name also exists in the STLport include folder. The idea behind
1.167 - * this is that we first go up one directory and then down into a dir that
1.168 - * is only present in the native install but not in STLport.
1.169 - *
1.170 - */
1.171 -# if !defined (_STLP_NATIVE_INCLUDE_PATH)
1.172 -# if defined (_X86_)
1.173 -# if defined (_STLP_WCE_TARGET_PROC_SUBTYPE_EMULATOR)
1.174 -# define _STLP_NATIVE_INCLUDE_PATH ../Emulator
1.175 -# else
1.176 -# define _STLP_NATIVE_INCLUDE_PATH ../X86
1.177 -# endif
1.178 -# elif defined (_ARM_)
1.179 -# if _MSC_VER < 1400
1.180 - // eVC3/4
1.181 -# if defined (ARMV4)
1.182 -# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
1.183 -# elif defined (ARMV4I)
1.184 -# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
1.185 -# elif defined (ARMV4T)
1.186 -# define _STLP_NATIVE_INCLUDE_PATH ../Armv4t
1.187 -# else
1.188 -# error Unknown ARM SDK.
1.189 -# endif
1.190 -# else
1.191 - // VC8 crosscompiling for CE
1.192 -# if defined (ARMV4)
1.193 -# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
1.194 -# elif defined(ARMV4I) || defined(ARMV4T)
1.195 -# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
1.196 -# else
1.197 -# error Unknown ARM SDK.
1.198 -# endif
1.199 -# endif
1.200 -# elif defined (_MIPS_)
1.201 -# if defined (MIPS16)
1.202 -# define _STLP_NATIVE_INCLUDE_PATH ../mips16
1.203 -# elif defined (MIPSII)
1.204 -# define _STLP_NATIVE_INCLUDE_PATH ../mipsII
1.205 -# elif defined (MIPSII_FP)
1.206 -# define _STLP_NATIVE_INCLUDE_PATH ../mipsII_fp
1.207 -# elif defined (MIPSIV)
1.208 -# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV
1.209 -# elif defined (MIPSIV_FP)
1.210 -# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV_fp
1.211 -# else
1.212 -# error Unknown MIPS SDK.
1.213 -# endif
1.214 -# elif defined (SHx)
1.215 -# if defined (SH3)
1.216 -# define _STLP_NATIVE_INCLUDE_PATH ../sh3
1.217 -# elif defined (SH4)
1.218 -# define _STLP_NATIVE_INCLUDE_PATH ../sh4
1.219 -# else
1.220 -# error Unknown SHx SDK.
1.221 -# endif
1.222 -# else
1.223 -# error Unknown SDK.
1.224 -# endif
1.225 -# endif /* !_STLP_NATIVE_INCLUDE_PATH */
1.226 -
1.227 -/* Workaround when using MFCCE and using <new> together: MFCCE's wcealt.h doesn't
1.228 - * check for __PLACEMENT_NEW_INLINE before defining operator new, so when <new>
1.229 - * defines the operatore before, there will be an error C2084:
1.230 - * "function 'void *__cdecl operator new(unsigned int,void *)' already has a body".
1.231 - */
1.232 -# ifdef _STLP_USE_MFC
1.233 -# define __PLACEMENT_NEW_INLINE
1.234 -# endif
1.235 -
1.236 -#endif /* _STLP_WCE_NET */
1.237 -
1.238 -/* Workaround in _windows.h needs native headers access macros
1.239 - * to be defined */
1.240 -#include <stl/config/_native_headers.h>
1.241 -
1.242 -/*
1.243 - * eMbedded Visual C++ 3.0 specific settings
1.244 - */
1.245 -#if defined (_STLP_WCE_EVC3)
1.246 -
1.247 -# define _STLP_NO_NATIVE_MBSTATE_T
1.248 -
1.249 -// evc3 has no locale and time support
1.250 -# define _STLP_NO_LOCALE_SUPPORT
1.251 -# define _STLP_NO_TIME_SUPPORT
1.252 -
1.253 -// evc3 has new, but no explicit header
1.254 -# define _STLP_NO_NEW_HEADER
1.255 -# define _STLP_NO_NEW_NEW_HEADER
1.256 -
1.257 -// evc3 has no bad_alloc and no typeinfo
1.258 -# undef _STLP_NO_BAD_ALLOC
1.259 -# define _STLP_NO_BAD_ALLOC
1.260 -
1.261 -# undef _STLP_NO_TYPEINFO
1.262 -# define _STLP_NO_TYPEINFO
1.263 -
1.264 -// missing things in eMbedded Visual C++ 3.0 headers
1.265 -# ifndef _SIZE_T_DEFINED
1.266 - typedef unsigned int size_t;
1.267 -# define _SIZE_T_DEFINED
1.268 -# endif
1.269 -
1.270 -# ifndef _WCHAR_T_DEFINED
1.271 - typedef unsigned short wchar_t;
1.272 -# define _WCHAR_T_DEFINED
1.273 -# endif
1.274 -
1.275 -// ptrdiff_t is not defined in evc3 headers
1.276 -# ifndef _PTRDIFF_T_DEFINED
1.277 - typedef int ptrdiff_t;
1.278 -# define _PTRDIFF_T_DEFINED
1.279 -# endif
1.280 -
1.281 -// clock_t is not defined in evc3 headers
1.282 -# ifndef _CLOCK_T_DEFINED
1.283 - typedef long clock_t;
1.284 -# define _CLOCK_T_DEFINED
1.285 -# endif
1.286 -
1.287 -// Struct tm is not defined in evc3 headers
1.288 -# ifndef _TM_DEFINED
1.289 -struct tm {
1.290 - int tm_sec; /* seconds after the minute - [0,59] */
1.291 - int tm_min; /* minutes after the hour - [0,59] */
1.292 - int tm_hour; /* hours since midnight - [0,23] */
1.293 - int tm_mday; /* day of the month - [1,31] */
1.294 - int tm_mon; /* months since January - [0,11] */
1.295 - int tm_year; /* years since 1900 */
1.296 - int tm_wday; /* days since Sunday - [0,6] */
1.297 - int tm_yday; /* days since January 1 - [0,365] */
1.298 - int tm_isdst; /* daylight savings time flag */
1.299 -};
1.300 -# define _TM_DEFINED
1.301 -# endif
1.302 -
1.303 -// define placement new and delete operator
1.304 -// note: when MFCCE headers are included first, don't define the new operator,
1.305 -// since it was already defined in wcealt.h
1.306 -# ifdef __cplusplus
1.307 -# ifndef __PLACEMENT_NEW_INLINE
1.308 -# ifndef _MFC_VER
1.309 -inline void *__cdecl operator new(size_t, void *_P) { return (_P); }
1.310 -# endif /* _MFC_VER */
1.311 -inline void __cdecl operator delete(void *, void *) { return; }
1.312 -# define __PLACEMENT_NEW_INLINE
1.313 -# endif
1.314 -# endif /* __cplusplus */
1.315 -
1.316 -// evc3 doesn't have native wide functions, e.g. fgetwc, wmemmove
1.317 -# define _STLP_NO_NATIVE_WIDE_FUNCTIONS
1.318 -
1.319 -// evc3 doesn't have assert.h
1.320 -# ifndef _ASSERT_DEFINED
1.321 -# define assert(expr) _STLP_ASSERT(expr)
1.322 -# define _ASSERT_DEFINED
1.323 -# endif
1.324 -
1.325 -#endif /* _STLP_WCE_EVC3 */
1.326 -
1.327 -// Minimize windows.h includes
1.328 -#if !defined (WIN32_LEAN_AND_MEAN)
1.329 -# define WIN32_LEAN_AND_MEAN
1.330 -#endif
1.331 -#if !defined (VC_EXTRALEAN)
1.332 -# define VC_EXTRALEAN
1.333 -#endif
1.334 -#if !defined (STRICT)
1.335 -# define STRICT
1.336 -#endif
1.337 -
1.338 -// Don't let windows.h define its min and max macros.
1.339 -#if !defined (NOMINMAX)
1.340 -# define NOMINMAX
1.341 -#endif
1.342 -
1.343 -/*
1.344 - * original call: TerminateProcess(GetCurrentProcess(), 0);
1.345 - * we substitute the GetCurrentProcess() with the result of the inline function
1.346 - * defined in kfuncs.h, since we then can avoid including <windows.h> at all.
1.347 - * all needed Win32 API functions are defined in <stl/_windows.h>
1.348 - */
1.349 -#ifndef _ABORT_DEFINED
1.350 -# define _STLP_ABORT() TerminateProcess(reinterpret_cast<HANDLE>(66), 0)
1.351 -# define _ABORT_DEFINED
1.352 -#endif
1.353 -
1.354 -// Notice: windows.h isn't included here anymore; all needed defines are in
1.355 -// stl/_windows.h now
1.356 -
1.357 -#endif /* _STLP_EVC_H */
1.358 +/*
1.359 + * File to have Microsoft eMbedded Visual C++ 3.0 and .NET working with STLport
1.360 + * May 2004
1.361 + * Origin : Zdenek Nemec - zero@mapfactor.com
1.362 + * Michael Fink - vividos@users.sourceforge.net
1.363 + */
1.364 +
1.365 +#ifndef _STLP_EVC_H
1.366 +#define _STLP_EVC_H
1.367 +
1.368 +#define _STLP_COMPILER "eMbedded Visual C++"
1.369 +
1.370 +// This flag is being used by STLport to support
1.371 +// old-fashioned Windows CE SDK (see stl_wince.h)
1.372 +// do not use with eMebedded Visual C++ 3 or 4!
1.373 +#ifdef _STLP_WINCE
1.374 +# undef _STLP_WINCE
1.375 +#endif
1.376 +
1.377 +/* Compiler dependent define. The following defines may be available:
1.378 + * _STLP_WCE_EVC3 when compiling under eMbedded Visual C++ 3
1.379 + * _STLP_WCE_NET when compiling under eMbedded Visual C++ .NET
1.380 + * _STLP_WCE always defined when compiling with one of the above
1.381 + */
1.382 +#undef _STLP_WCE_EVC3
1.383 +#undef _STLP_WCE_NET
1.384 +
1.385 +#if (_WIN32_WCE > 300)
1.386 +# define _STLP_WCE_NET UNDER_CE
1.387 +#elif (_WIN32_WCE == 300)
1.388 +# define _STLP_WCE_EVC3 UNDER_CE
1.389 +#else
1.390 +# error No support for Windows CE below 3.0!
1.391 +#endif
1.392 +
1.393 +// This is defined for all platforms using Windows CE
1.394 +#define _STLP_WCE
1.395 +
1.396 +/* All Windows CE versions up to at least version 5 are little-endian, even
1.397 + * if the hardware (like e.g. MIPS) can be configured for big-endian, too. */
1.398 +#define _STLP_LITTLE_ENDIAN
1.399 +
1.400 +// Ensure _DEBUG is defined.
1.401 +#if defined (DEBUG) && !defined (_DEBUG)
1.402 +# define _DEBUG
1.403 +#endif
1.404 +
1.405 +// in evc3/4, on ARM, check that _STLP_DEBUG is not defined
1.406 +// the ARM compiler has a bug that prevents that debug mode from working
1.407 +#if _WIN32_WCE < 500 && defined(ARM) && defined(_STLP_DEBUG)
1.408 +# error _STLP_DEBUG mode is not supported in evc3 and evc4 on the ARM platform!
1.409 +#endif
1.410 +
1.411 +// inherit all msvc6 options
1.412 +#include <stl/config/_msvc.h>
1.413 +
1.414 +// CE up to at least version 5 has no C locale support
1.415 +#define _STLP_NO_LOCALE_SUPPORT
1.416 +
1.417 +#if _WIN32_WCE >= 0x500
1.418 + // SDKs built with PB5 have terminate&co in namespace std...
1.419 +# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_STD
1.420 +# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_STD
1.421 + // ...and new_handler/set_new_handler in the global namespace.
1.422 +# define _STLP_GLOBAL_NEW_HANDLER 1
1.423 +#endif
1.424 +
1.425 +// Always threaded in eMbedded Visual C++ 3.0 and .NET
1.426 +#ifndef _MT
1.427 +# define _MT
1.428 +#endif
1.429 +
1.430 +// we don't have a static native runtime library
1.431 +#undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
1.432 +
1.433 +#if _WIN32_WCE < 400
1.434 +// no long double under CE3 and older
1.435 +# define _STLP_NO_LONG_DOUBLE
1.436 +#endif
1.437 +
1.438 +// no *f and *l math functions available
1.439 +#define _STLP_NO_VENDOR_MATH_F
1.440 +#define _STLP_NO_VENDOR_MATH_L
1.441 +
1.442 +/*
1.443 + * Redirect cout, cerr and clog:
1.444 + * If defined redirect cout, cerr and clog to
1.445 + * files stdout.txt, stderr.txt and stdlog.txt
1.446 + */
1.447 +//# define _STLP_REDIRECT_STDSTREAMS
1.448 +
1.449 +/*
1.450 + * Static class members may generate LNK1179:
1.451 + * Wrong COMDAT packing may cause LNK1179 error.
1.452 + * For details see http://groups.google.com/groups?th=8a05c82c4ffee280
1.453 + * example P78. This define is not used/needed at this moment
1.454 + * but may came handy in future...
1.455 + */
1.456 +//# define _STLP_STATIC_MEMBERS_BUG
1.457 +
1.458 +// Use wide-string interface of windows native functions (CreateFile...).
1.459 +// Note that this should be defined all the time while under CE.
1.460 +#if defined (UNICODE)
1.461 +# define _STLP_USE_WIDE_INTERFACE
1.462 +#endif
1.463 +
1.464 +// Force exception std to std instead of __std_alias.
1.465 +#if defined (__cplusplus) && !defined (_STLP_HAS_NO_NAMESPACES)
1.466 +# ifdef _STLP_VENDOR_EXCEPT_STD
1.467 +# undef _STLP_VENDOR_EXCEPT_STD
1.468 +# endif
1.469 +# define _STLP_VENDOR_EXCEPT_STD std
1.470 +#endif
1.471 +
1.472 +// short string optimization bug under evc3, evc4 using ARM compiler
1.473 +#if _MSC_VER<1400 && (defined (ARM) || defined (_ARM_))
1.474 +# define _STLP_DONT_USE_SHORT_STRING_OPTIM
1.475 +#endif
1.476 +
1.477 +// when using MFC, disable another placement new declaration, since there is one in wcealt.h
1.478 +#if !defined (__BUILDING_STLPORT) && defined (_MFC_VER)
1.479 +# define __PLACEMENT_NEW_INLINE
1.480 +#endif
1.481 +
1.482 +// threads
1.483 +#undef _REENTRANT
1.484 +#define _REENTRANT
1.485 +#undef _NOTHREADS
1.486 +
1.487 +// Use old fashioned headers (ctime vs. time.h).
1.488 +#undef _STLP_NO_NEW_C_HEADERS
1.489 +#define _STLP_NO_NEW_C_HEADERS
1.490 +
1.491 +// exception handling support: only on evc4 and user added /GX to project settings
1.492 +#if defined (_STLP_WCE_EVC3) || !defined (_CPPUNWIND)
1.493 +# define _STLP_NO_EXCEPTION_HEADER
1.494 +# define _STLP_NO_EXCEPTIONS
1.495 +# undef _STLP_USE_EXCEPTIONS
1.496 +# ifndef __THROW_BAD_ALLOC
1.497 +# define __THROW_BAD_ALLOC { _STLP_WINCE_TRACE(L"out of memory"); ExitThread(1); }
1.498 +# endif
1.499 +#endif
1.500 +
1.501 +#define _STLP_WINCE_TRACE(msg) OutputDebugString(msg)
1.502 +
1.503 +/*
1.504 + * eMbedded Visual C++ .NET specific settings
1.505 + */
1.506 +#if defined (_STLP_WCE_NET)
1.507 +
1.508 +// evc4 has no locale and time support
1.509 +# define _STLP_NO_LOCALE_SUPPORT
1.510 +# define _STLP_NO_TIME_SUPPORT
1.511 +
1.512 +// ptrdiff_t is not defined in evc4 headers
1.513 +# ifndef _PTRDIFF_T_DEFINED
1.514 + typedef int ptrdiff_t;
1.515 +# define _PTRDIFF_T_DEFINED
1.516 +# endif
1.517 +
1.518 +/*
1.519 + * Helper macros for including the native headers in cases where a file with
1.520 + * the same name also exists in the STLport include folder. The idea behind
1.521 + * this is that we first go up one directory and then down into a dir that
1.522 + * is only present in the native install but not in STLport.
1.523 + *
1.524 + */
1.525 +# if !defined (_STLP_NATIVE_INCLUDE_PATH)
1.526 +# if defined (_X86_)
1.527 +# if defined (_STLP_WCE_TARGET_PROC_SUBTYPE_EMULATOR)
1.528 +# define _STLP_NATIVE_INCLUDE_PATH ../Emulator
1.529 +# else
1.530 +# define _STLP_NATIVE_INCLUDE_PATH ../X86
1.531 +# endif
1.532 +# elif defined (_ARM_)
1.533 +# if _MSC_VER < 1400
1.534 + // eVC3/4
1.535 +# if defined (ARMV4)
1.536 +# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
1.537 +# elif defined (ARMV4I)
1.538 +# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
1.539 +# elif defined (ARMV4T)
1.540 +# define _STLP_NATIVE_INCLUDE_PATH ../Armv4t
1.541 +# else
1.542 +# error Unknown ARM SDK.
1.543 +# endif
1.544 +# else
1.545 + // VC8 crosscompiling for CE
1.546 +# if defined (ARMV4)
1.547 +# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
1.548 +# elif defined(ARMV4I) || defined(ARMV4T)
1.549 +# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
1.550 +# else
1.551 +# error Unknown ARM SDK.
1.552 +# endif
1.553 +# endif
1.554 +# elif defined (_MIPS_)
1.555 +# if defined (MIPS16)
1.556 +# define _STLP_NATIVE_INCLUDE_PATH ../mips16
1.557 +# elif defined (MIPSII)
1.558 +# define _STLP_NATIVE_INCLUDE_PATH ../mipsII
1.559 +# elif defined (MIPSII_FP)
1.560 +# define _STLP_NATIVE_INCLUDE_PATH ../mipsII_fp
1.561 +# elif defined (MIPSIV)
1.562 +# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV
1.563 +# elif defined (MIPSIV_FP)
1.564 +# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV_fp
1.565 +# else
1.566 +# error Unknown MIPS SDK.
1.567 +# endif
1.568 +# elif defined (SHx)
1.569 +# if defined (SH3)
1.570 +# define _STLP_NATIVE_INCLUDE_PATH ../sh3
1.571 +# elif defined (SH4)
1.572 +# define _STLP_NATIVE_INCLUDE_PATH ../sh4
1.573 +# else
1.574 +# error Unknown SHx SDK.
1.575 +# endif
1.576 +# else
1.577 +# error Unknown SDK.
1.578 +# endif
1.579 +# endif /* !_STLP_NATIVE_INCLUDE_PATH */
1.580 +
1.581 +/* Workaround when using MFCCE and using <new> together: MFCCE's wcealt.h doesn't
1.582 + * check for __PLACEMENT_NEW_INLINE before defining operator new, so when <new>
1.583 + * defines the operatore before, there will be an error C2084:
1.584 + * "function 'void *__cdecl operator new(unsigned int,void *)' already has a body".
1.585 + */
1.586 +# ifdef _STLP_USE_MFC
1.587 +# define __PLACEMENT_NEW_INLINE
1.588 +# endif
1.589 +
1.590 +#endif /* _STLP_WCE_NET */
1.591 +
1.592 +/* Workaround in _windows.h needs native headers access macros
1.593 + * to be defined */
1.594 +#include <stl/config/_native_headers.h>
1.595 +
1.596 +/*
1.597 + * eMbedded Visual C++ 3.0 specific settings
1.598 + */
1.599 +#if defined (_STLP_WCE_EVC3)
1.600 +
1.601 +# define _STLP_NO_NATIVE_MBSTATE_T
1.602 +
1.603 +// evc3 has no locale and time support
1.604 +# define _STLP_NO_LOCALE_SUPPORT
1.605 +# define _STLP_NO_TIME_SUPPORT
1.606 +
1.607 +// evc3 has new, but no explicit header
1.608 +# define _STLP_NO_NEW_HEADER
1.609 +# define _STLP_NO_NEW_NEW_HEADER
1.610 +
1.611 +// evc3 has no bad_alloc and no typeinfo
1.612 +# undef _STLP_NO_BAD_ALLOC
1.613 +# define _STLP_NO_BAD_ALLOC
1.614 +
1.615 +# undef _STLP_NO_TYPEINFO
1.616 +# define _STLP_NO_TYPEINFO
1.617 +
1.618 +// missing things in eMbedded Visual C++ 3.0 headers
1.619 +# ifndef _SIZE_T_DEFINED
1.620 + typedef unsigned int size_t;
1.621 +# define _SIZE_T_DEFINED
1.622 +# endif
1.623 +
1.624 +# ifndef _WCHAR_T_DEFINED
1.625 + typedef unsigned short wchar_t;
1.626 +# define _WCHAR_T_DEFINED
1.627 +# endif
1.628 +
1.629 +// ptrdiff_t is not defined in evc3 headers
1.630 +# ifndef _PTRDIFF_T_DEFINED
1.631 + typedef int ptrdiff_t;
1.632 +# define _PTRDIFF_T_DEFINED
1.633 +# endif
1.634 +
1.635 +// clock_t is not defined in evc3 headers
1.636 +# ifndef _CLOCK_T_DEFINED
1.637 + typedef long clock_t;
1.638 +# define _CLOCK_T_DEFINED
1.639 +# endif
1.640 +
1.641 +// Struct tm is not defined in evc3 headers
1.642 +# ifndef _TM_DEFINED
1.643 +struct tm {
1.644 + int tm_sec; /* seconds after the minute - [0,59] */
1.645 + int tm_min; /* minutes after the hour - [0,59] */
1.646 + int tm_hour; /* hours since midnight - [0,23] */
1.647 + int tm_mday; /* day of the month - [1,31] */
1.648 + int tm_mon; /* months since January - [0,11] */
1.649 + int tm_year; /* years since 1900 */
1.650 + int tm_wday; /* days since Sunday - [0,6] */
1.651 + int tm_yday; /* days since January 1 - [0,365] */
1.652 + int tm_isdst; /* daylight savings time flag */
1.653 +};
1.654 +# define _TM_DEFINED
1.655 +# endif
1.656 +
1.657 +// define placement new and delete operator
1.658 +// note: when MFCCE headers are included first, don't define the new operator,
1.659 +// since it was already defined in wcealt.h
1.660 +# ifdef __cplusplus
1.661 +# ifndef __PLACEMENT_NEW_INLINE
1.662 +# ifndef _MFC_VER
1.663 +inline void *__cdecl operator new(size_t, void *_P) { return (_P); }
1.664 +# endif /* _MFC_VER */
1.665 +inline void __cdecl operator delete(void *, void *) { return; }
1.666 +# define __PLACEMENT_NEW_INLINE
1.667 +# endif
1.668 +# endif /* __cplusplus */
1.669 +
1.670 +// evc3 doesn't have native wide functions, e.g. fgetwc, wmemmove
1.671 +# define _STLP_NO_NATIVE_WIDE_FUNCTIONS
1.672 +
1.673 +// evc3 doesn't have assert.h
1.674 +# ifndef _ASSERT_DEFINED
1.675 +# define assert(expr) _STLP_ASSERT(expr)
1.676 +# define _ASSERT_DEFINED
1.677 +# endif
1.678 +
1.679 +#endif /* _STLP_WCE_EVC3 */
1.680 +
1.681 +// Minimize windows.h includes
1.682 +#if !defined (WIN32_LEAN_AND_MEAN)
1.683 +# define WIN32_LEAN_AND_MEAN
1.684 +#endif
1.685 +#if !defined (VC_EXTRALEAN)
1.686 +# define VC_EXTRALEAN
1.687 +#endif
1.688 +#if !defined (STRICT)
1.689 +# define STRICT
1.690 +#endif
1.691 +
1.692 +// Don't let windows.h define its min and max macros.
1.693 +#if !defined (NOMINMAX)
1.694 +# define NOMINMAX
1.695 +#endif
1.696 +
1.697 +/*
1.698 + * original call: TerminateProcess(GetCurrentProcess(), 0);
1.699 + * we substitute the GetCurrentProcess() with the result of the inline function
1.700 + * defined in kfuncs.h, since we then can avoid including <windows.h> at all.
1.701 + * all needed Win32 API functions are defined in <stl/_windows.h>
1.702 + */
1.703 +#ifndef _ABORT_DEFINED
1.704 +# define _STLP_ABORT() TerminateProcess(reinterpret_cast<HANDLE>(66), 0)
1.705 +# define _ABORT_DEFINED
1.706 +#endif
1.707 +
1.708 +// Notice: windows.h isn't included here anymore; all needed defines are in
1.709 +// stl/_windows.h now
1.710 +
1.711 +#endif /* _STLP_EVC_H */