Hi all, Looking at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcechp40/html/ccrefPredefinedPreprocessorIdentifiers.asp
It says: *_M_ARM* Defined as 4 for ARM. *_M_ARMT* Defined as 4 for Thumb. But, testing with MSVC with the following mini-program, and with changing the target processor type in the project settings, I see that _M_ARM and _M_ARMT get defined to 4 or 5 depending on what arm arch is selected. Also, _M_ARMT is only defined if a thumb enabled arch is selected (armv4t and armv5t).Therefore I am committing the attached patches, to make us define the same values too.
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { printf ("_M_ARM = %d\n", _M_ARM); #ifdef _M_ARMT printf ("_M_ARMT = %d\n", _M_ARMT); #else printf ("_M_ARMT not defined\n"); #endif return 0; } Cheers, Pedro Alves --- src/gcc/gcc/ChangeLog.ce: 2006-11-12 Pedro Alves <[EMAIL PROTECTED]> * config/arm/wince-pe.h (TARGET_OS_CPP_BUILTINS): Delete _M_ARM and ARM. --- src/w32api/ChangeLog.ce: 2006-11-12 Pedro Alves <[EMAIL PROTECTED]> * include/winnt.h (_M_ARM, ARM): Translate from gcc target defines.
Index: config/arm/wince-pe.h =================================================================== --- config/arm/wince-pe.h (revision 780) +++ config/arm/wince-pe.h (working copy) @@ -73,9 +73,7 @@ #define TARGET_OS_CPP_BUILTINS() \ do \ { \ - builtin_define ("_M_ARM=1"); \ - builtin_define ("ARM=1"); \ - /* We currently defined UNDER_CE to a non-value, and it seems \ + /* We currently define UNDER_CE to a non-value, as it seems \ MSVC2005 does the same. */ \ builtin_define_std ("UNDER_CE"); \ builtin_define ("_UNICODE"); \
Index: winnt.h =================================================================== --- winnt.h (revision 791) +++ winnt.h (working copy) @@ -15,6 +15,30 @@ #elif defined(__i386__) && !defined(_M_IX86) #define _M_IX86 300 #endif + +#if !defined(_M_ARM) +#if defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__) +#define _M_ARM 4 +#elif defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) \ + || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) +#define _M_ARM 5 +#elif defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6ZK__) \ + || defined (__ARM_ARCH_6K__) +#define _M_ARM 6 +#endif +#endif /* !defined(_M_ARM) */ + +#if !defined(_M_ARMT) +#if defined (__ARM_ARCH_4T__) +#define _M_ARMT 4 +#elif defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) +#define _M_ARMT 5 +#elif defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6ZK__) \ + || defined (__ARM_ARCH_6K__) +#define _M_ARMT 6 +#endif +#endif /* !defined(_M_ARMT) */ + #if defined(_M_IX86) && !defined(_X86_) #define _X86_ #elif defined(_M_ALPHA) && !defined(_ALPHA_) @@ -25,6 +49,8 @@ #define _MIPS_ #elif defined(_M_M68K) && !defined(_68K_) #define _68K_ +#elif defined(_M_ARM) && !defined(ARM) +#define ARM #endif #ifdef __cplusplus
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel