eg :C语言的long数据类型在32位操作系统和64位操作系统的字节数分别为4、8。为了实现程序的可移植性,需要将数据类型重定义。(其它语言也类似)
arm平台下的数据类型重定义
typedef char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
typedef float f32;
typedef signed long long s64;
typedef unsigned long long u64;
ppc平台下的数据类型重定义
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long s64;
typedef unsigned long u