[LCP]#defines to know Endianness
John Navil Joseph
navil at emuzed.com
Thu Jul 1 16:22:02 UTC 2004
Yes, linux does define the BYTE_ORDER macro, but it may not be
defined in other operating systems (windows?).
I'm just wondering if C Standard requires this macro to be defined
by all compilers, then I can be sure that mine would be a truly
portable code.
Regards,
John
On Thu, 1 Jul 2004 17:22:18 +1000, Greg Black <gjb at gbch.net> wrote:
> On 2004-07-01, John Navil Joseph wrote:
>
>> Is there any predefined macros (#defines like __cplusplus) that the
>> compiler defines so as to know the endianess of the machine that the
>> compiled code is to run on?
>
> Does Linux not have the BYTE_ORDER macro in <machine/endian.h>?
> _______________________________________________
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
--
John Navil Joseph
Software Engineer, Systems
eMuzed India Pvt Ltd.
e-mail : navil at emuzed.com
navil at mm.st
Tel : +91 80 5252224 Ext : 504
Fax : +91 80 5203257
Mobile : +91 9845454524
More information about the linuxCprogramming
mailing list