从 C/C++ 程序员的角度来看,32位系统与64位系统的本质区别是什么?注意
这里说的是广义的32位和64位,而不特定指 i386, amd64. 是否是指针长度不一样?
我现在这样区分两者:

#if __SIZEOF_POINTER__ == 4
        /* 32位系统 */
#elif __SIZEOF_POINTER__ == 8
        /* 64位系统 */
#endif

  这是 GCC 下的标准的做法吗?另外顺便问一下,在 Windows 下的 MSVC 里,
该用什么宏来区分两者? Windows 似乎只支持i386, amd64, 应该容易应付。不过
最新的 Windows 8 好像也开始支持 MIPS 系统。





-- 
To UNSUBSCRIBE, email to debian-chinese-gb-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120426234014.GA2646@localhost.localdomain

回复