A simple but substantial change: uIP used the htons()/HTONS() macro

functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
This commit is contained in:
adamdunkels 2010-10-19 18:29:03 +00:00
parent 5a46c629de
commit 5585d72c86
115 changed files with 675 additions and 675 deletions

View file

@ -29,7 +29,7 @@
*
* This file is part of the "contiki" web browser.
*
* $Id: webclient.c,v 1.10 2010/06/14 14:08:17 nifi Exp $
* $Id: webclient.c,v 1.11 2010/10/19 18:29:03 adamdunkels Exp $
*
*/
@ -151,7 +151,7 @@ webclient_get(const char *host, u16_t port, const char *file)
#endif /* UIP_UDP */
}
conn = tcp_connect(ipaddr, htons(port), NULL);
conn = tcp_connect(ipaddr, uip_htons(port), NULL);
if(conn == NULL) {
return 0;