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

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: testv6.c,v 1.3 2010/02/05 19:13:06 oliverschmidt Exp $
* $Id: testv6.c,v 1.4 2010/10/19 18:29:05 adamdunkels Exp $
*/
#include "contiki-net.h"
@ -54,7 +54,7 @@ PROCESS_THREAD(test_process, ev, data)
uip_ip6addr(&ip6addr, 0xfc00,0,0,0,0,0,0,0x231);
tcp_connect(&ip6addr, HTONS(7), NULL);
tcp_connect(&ip6addr, UIP_HTONS(7), NULL);
while(1) {
PROCESS_WAIT_EVENT();
@ -67,7 +67,7 @@ PROCESS_THREAD(test_tcpip_process, ev, data)
{
PROCESS_BEGIN();
tcp_listen(HTONS(800));
tcp_listen(UIP_HTONS(800));
while(1) {
PROCESS_WAIT_EVENT_UNTIL(ev == tcpip_event);