Thread (12 messages) flat view 12 messages, 7 authors, 2012-02-22

How to figure out the byteorder only with one byte number?

From: Tao Jiang <hidden>
Date: 2012-02-18 14:33:07

Hi:

As far as I know, we can use an integer 0x12345678 with four bytes
and bytes[4] array to figure out a machine's byteorder

Is there a method use only one byte 0x01
and some shifts do the same work?

Thank you.

---------------
jiangtao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help