On Monday, 7 de November de 2011 11:44:56 Chris Meyer wrote:
> I don't know the history of the endian test; but it seems to make more
> sense to use something direct like:
>
> int num = 1;
> if(*(char *)&num == 1)
> {
> printf("Little-Endian\n");
> }
> else
> {
> printf("Big-Endian\n");
> }
That requires running the executable. You can't do that if you're cross-
compiling.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
