int checkCPUendian(){
union {
unsigned int a;
unsigned char b;
}c;
c.a = 1;
return (c.b == 1);
} /*return 1 : little-endian, return 0:big-endian*/
int checkCPUendian(){
最新推荐文章于 2022-04-10 21:02:15 发布
int checkCPUendian(){
union {
unsigned int a;
unsigned char b;
}c;
c.a = 1;
return (c.b == 1);
} /*return 1 : little-endian, return 0:big-endian*/