Verified recvfrom()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@402 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-11-23 19:25:39 +00:00
parent ef651cc6bc
commit 2ce5085cc8
10 changed files with 288 additions and 89 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ uint32 htonl(uint32 hl)
#ifdef CONFIG_ENDIAN_BIG
return hl;
#else
return (uint32)htons((uint16)((hl) << 16)) | (uint32)htons((uint16)((hl) & 0xffff));
return (( (hl) >> 24) |
(((hl) >> 8) & 0x0000ff00) |
(((hl) << 8) & 0x00ff0000) |
( (hl) << 24));
#endif
}