#ifndef __FIXINCL_H
#define __FIXINCL_H

//for compatibility with MS headers

#define WINCEMACRO
#define ARM 1
#define _ARM_ 1
#define ARMV4 1
#define ARM_WINCE 1
// in some cases #defining _WIN32 may help, but when compiling GCC it causes problems
#define _WIN32
#define WIN32
#define UNDER_CE 400
#define NDEBUG
#define __int64 long long
#define __cdecl
#define __unaligned
#define _inline inline
#define UNICODE
#define _WIN32_WCE 400
#define _UNICODE
#define _MT
//#define _AFXDLL


#define __GNUC__ 3
#define __GNUC_MINOR__ 3
#define __GNUC_PATCHLEVEL__ 3

#define __GXX_ABI_VERSION 102
//#define __NO_INLINE__

#ifndef __STDC_HOSTED__
#define __STDC_HOSTED__ 1
#define __ARM_ARCH_4__
#define __ARMEL__
#define __pe__
#define __arm__
#define __STDC__ 1
#endif

#define __APCS_32__
#define __declspec(x) __attribute__((x))
#define __export __declspec(dllexport)
#define __import __declspec(dllimport)

#define __fastcall
#define _FORCENAMELESSUNION


//size_t and wchar_t are defined in many different places in all SDKs.
//let's put them here (just to be sure)

#ifndef _SIZE_T_DEFINED
//typedef unsigned int size_t;
typedef long unsigned int size_t;
#define _SIZE_T_DEFINED
#endif

#ifndef __cplusplus
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#endif

//ptrdiff_t is not defined in Windows CE SDK
#ifndef _PTRDIFF_T_DEFINED
typedef long int ptrdiff_t;
#define _PTRDIFF_T_DEFINED
#endif

#ifndef _ULONGLONG_
typedef unsigned long long ULONGLONG;
#define _ULONGLONG_
#endif

#endif
