21#ifndef _STLP_INTERNAL_WINDOWS_H
22#define _STLP_INTERNAL_WINDOWS_H
24#if !defined (_STLP_PLATFORM)
25# define _STLP_PLATFORM "Windows"
28#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
30# define _STLP_BIG_ENDIAN 1
32# if defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
33 defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
35# define _STLP_LITTLE_ENDIAN 1
37# if defined (__ia64__)
39# if defined (__BIG_ENDIAN__)
40# define _STLP_BIG_ENDIAN 1
42# define _STLP_LITTLE_ENDIAN 1
47#if !defined (_STLP_WINDOWS_H_INCLUDED)
48# define _STLP_WINDOWS_H_INCLUDED
49# if defined (__BUILDING_STLPORT)
54# if !defined (_STLP_OUTERMOST_HEADER_ID)
55# define _STLP_OUTERMOST_HEADER_ID 0x100
57# if !defined (WIN32_LEAN_AND_MEAN)
58# define WIN32_LEAN_AND_MEAN
60# if !defined (VC_EXTRALEAN)
64# if !defined (NOMINMAX)
70# if defined (_STLP_USE_MFC)
75# if (_STLP_OUTERMOST_HEADER_ID == 0x100)
76# undef _STLP_OUTERMOST_HEADER_ID
80# if defined (__cplusplus)
83# if (defined (_M_AMD64) || defined (_M_IA64) || (!defined (_STLP_WCE) && defined (_M_MRX000)) || defined (_M_ALPHA) || \
84 (defined (_M_PPC) && (_STLP_MSVC_LIB >= 1000))) && !defined (RC_INVOKED)
85# define InterlockedIncrement _InterlockedIncrement
86# define InterlockedDecrement _InterlockedDecrement
87# define InterlockedExchange _InterlockedExchange
91# define _STLP_STDCALL _cdecl
93# define _STLP_STDCALL __stdcall
97# if defined (_STLP_NEW_PLATFORM_SDK) && !defined(_WDMDDK_)
99# if !defined(WIN32_NO_STATUS)
100# define WIN32_NO_STATUS
104#ifndef InterlockedIncrement
113# elif !defined (_STLP_WCE)
125# if !defined (NOMINMAX)
132# if (_WIN32_WCE >= 0x500)
133# define _STLP_NATIVE_SETJMP_H_INCLUDED
150# define MessageBox MessageBoxW
153# define wvsprintf wvsprintfW
158# if !defined (COREDLL)
159# define _STLP_WCE_WINBASEAPI DECLSPEC_IMPORT
161# define _STLP_WCE_WINBASEAPI
164_STLP_WCE_WINBASEAPI
int WINAPI
166 int cbMultiByte,
LPWSTR lpWideCharStr,
int cchWideChar);
172# define OutputDebugString OutputDebugStringW
177# undef _STLP_WCE_WINBASEAPI
186# if !defined (_STLP_WCE)
190# if defined (InterlockedIncrement) && defined(_MSC_VER)
191# pragma intrinsic(_InterlockedIncrement)
192# pragma intrinsic(_InterlockedDecrement)
193# pragma intrinsic(_InterlockedExchange)
195# pragma intrinsic(_InterlockedExchangePointer)
198# if defined (__cplusplus)
206# if !defined (_WIN64)
208# if defined (__cplusplus) && defined(__BUILDING_STLPORT)
214void*
_STLP_CALL STLPInterlockedExchangePointer(
void*
volatile* __a,
void* __b) {
215# if defined (_STLP_MSVC)
220# pragma warning (push)
221# pragma warning (disable : 4311)
222# pragma warning (disable : 4312)
224# if !defined (_STLP_NO_NEW_STYLE_CASTS)
225 return reinterpret_cast<void*
>(
InterlockedExchange(
reinterpret_cast<long*
>(
const_cast<void**
>(__a)),
226 reinterpret_cast<long>(__b)));
230# if defined (_STLP_MSVC)
231# pragma warning (pop)
236# define STLPInterlockedExchangePointer _InterlockedExchangePointer
245#if (defined (WINVER) && (WINVER < 0x0410) && (!defined (_WIN32_WINNT) || (_WIN32_WINNT < 0x400))) || \
246 (!defined (WINVER) && (defined (_WIN32_WINDOWS) && (_WIN32_WINDOWS < 0x0410) || \
247 (defined (_WIN32_WINNT) && (_WIN32_WINNT < 0x400))))
248# define _STLP_WIN95_LIKE
257#if (defined (_DEBUG) || defined (_STLP_DEBUG)) && \
258 (defined (_STLP_MSVC) && (_STLP_MSVC < 1310) || \
259 defined (__GNUC__) && (__GNUC__ < 3))
265# if defined (__BUILDING_STLPORT)
266# if defined (_STLP_WIN95_LIKE)
267# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98
269# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95
272# if defined (_STLP_WIN95_LIKE)
273# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98
275# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95
280#if defined (__WIN16) || defined (WIN16) || defined (_WIN16)
287#if defined(_STLP_WIN32)
288# define _STLP_USE_WIN32_IO
292#if defined(__MINGW32__) && !defined(_STLP_USE_STDIO_IO)
293# define _STLP_USE_WIN32_IO
297# define _STLP_USE_UNIX_EMULATION_IO
298# define _STLP_LDOUBLE_80
#define _STLP_IMPORT_DECLSPEC
_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char *lpOutputString)
#define InterlockedIncrement
#define InterlockedExchange
#define InterlockedDecrement
#define MultiByteToWideChar
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
VOID WINAPI ExitThread(IN DWORD uExitCode)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
void * _InterlockedExchangePointer(_Interlocked_operand_ void *volatile *_Target, void *_Value)
_In_ BOOL _In_ HANDLE hProcess
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
int WINAPI wvsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR, _In_ va_list arglist)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)