函数宏判断小端

/*
 * 判断运行环境是否为小端
 */
static const int endianTest = 1;
#define IsLittleEndian() (*(char *)&endianTest == 1)

 

posted on 2014-02-08 13:44  刘宝成  阅读(170)  评论(0编辑  收藏  举报

导航