/* This prints 04030201 */
printf ("b= %0X \n", *b);
all is OK, you did this probably on x86 CPU which is little endian. on
powerpc it would be 01020304 as it is big endian.
to write endian independent code:
man htonl
all these are macros actually.
"network order" is big endian. so eg htonl would reverse order on x86, and
ddo nothing on powerpc.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"