标签:
1 static union { char c[4]; unsigned long mylong; } endian_test = {{ ‘l‘, ‘?‘, ‘?‘, ‘b‘ } }; 2 3 #define ENDIANNESS ((char)endian_test.mylong)
如果ENDIANNESS=’l’表示系统为little endian,
为’b’表示big endian
标签:
原文地址:http://www.cnblogs.com/yuan1164345228/p/5922642.html