Hi guys, Should _WIN32_WCE be hexadecimal or decimal?
Our headers test for it mostly as hexadecimal, except for two places: >grep _WIN32_WCE * | grep ">" | grep -v 0x aygshell.h:#if _WIN32_WCE >= 400 aygshell.h:#endif /* _WIN32_WCE >= 400 */ service.h:#if defined(_WIN32_WCE) && (_WIN32_WCE >= 400) >grep _WIN32_WCE * | grep ">" | grep 0x aygshell.h:#if (_WIN32_WCE >= 0x0420) aygshell.h:#if (_WIN32_WCE >= 0x0300) aygshell.h:#if (_WIN32_WCE >= 0x0400) aygshell.h:#endif /* _WIN32_WCE >= 0x0300 */ commctrl.h:#if (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x200) commctrl.h:#if (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x200) commctrl.h:#if (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x0200) commctrl.h:#if (_WIN32_WINNT >= 0x0501) && !defined (_WIN32_WCE) commctrl.h:#endif /* (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x0200) */ commctrl.h:#if (_WIN32_IE >= 0x0400) || (_WIN32_WCE >= 0x0200) commctrl.h:#if (_WIN32_IE >= 0x0300) || (_WIN32_WCE >= 0x200) commctrl.h:#if (_WIN32_WCE >= 0x200) commctrl.h:#endif /* _WIN32_WCE >= 0x200 */ commctrl.h:#if (_WIN32_WCE >= 0x0200) commctrl.h:#endif /* _WIN32_WCE >= 0x200 */ commdlg.h:#if (_WIN32_WCE >= 0x0200) shellapi.h:#if (_WIN32_WCE >= 0x300) sipapi.h:#if _WIN32_WCE >= 0x0201 sipapi.h:#endif /* _WIN32_WCE >= 0x0201 */ tlhelp32.h:#if (_WIN32_WCE >= 0x200) winbase.h:# if (_WIN32_WCE >= 0x300) winbase.h:#if (_WIN32_WCE >= 0x300) wingdi.h:#if (_WIN32_WCE >= 0x200) winuser.h:#if (_WIN32_WCE >= 0x0400) I would be inclined to make them all hex, except that, it looks like older versions of MSFT's tools defined it as decimal and the corresponding SDKs followed suit, but that seems to have changed with more recent SDKs ? See here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=500260&SiteID=1 Anyone know which was the first SDK/IDE pair that that started expecting/defining _WIN32_WCE as hex? To see for yourself, try googling for: "_WIN32_WCE == 500", "_WIN32_WCE >= 500", "_WIN32_WCE == 0x500", "_WIN32_WCE > 0x420" "_WIN32_WCE > 200", and other variations. What should we do? Test older versions as decimal and newer as hex? #if _WIN32_WCE >= 200 #elif _WIN32_WCE >= 0x420 #endif Goggling around, it seems that's what most people's code expects, but it isn't a silver bullet. There's even those that test for both forms: http://hostap.epitest.fi/wpa_supplicant/devel/driver__ndis_8c-source.html Cheers, Pedro Alves ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel