Forum Discussion
Altera_Forum
Honored Contributor
17 years agoWhat about with the endianess?
try whit this code: unsigned int htonl (unsigned int x) { # if BYTE_ORDER == LITTLE_ENDIAN unsigned char *s = (unsigned char *) &x; return (unsigned int) (s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); # else return x;# endif }