ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtutil.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtutil.h (file contents):
Revision 1.43 by root, Mon Jan 3 18:42:58 2011 UTC vs.
Revision 1.44 by root, Mon Jan 3 18:52:41 2011 UTC

45 45
46namespace byteorder { 46namespace byteorder {
47 static unsigned char e () 47 static unsigned char e ()
48 { 48 {
49 const uint32_t u = 0x11223344; 49 const uint32_t u = 0x11223344;
50 return *(unsigned char *)u; 50 return *(unsigned char *)&u;
51 } 51 }
52 52
53 static bool big_endian () { return e () == 0x11; }; 53 static bool big_endian () { return e () == 0x11; };
54 static bool network () { return big_endian (); }; 54 static bool network () { return big_endian (); };
55 static bool little_endian () { return e () == 0x44; }; 55 static bool little_endian () { return e () == 0x44; };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines