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:
parent
5a46c629de
commit
5585d72c86
115 changed files with 675 additions and 675 deletions
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: ftp.c,v 1.9 2010/10/16 09:55:06 oliverschmidt Exp $
|
||||
* $Id: ftp.c,v 1.10 2010/10/19 18:29:03 adamdunkels Exp $
|
||||
*/
|
||||
/* Note to self: It would be nice to have a "View" option in the download dialog. */
|
||||
|
||||
|
@ -436,7 +436,7 @@ PROCESS_THREAD(ftp_process, ev, data)
|
|||
/* Either found a hostname, or not. */
|
||||
if((char *)data != NULL &&
|
||||
(ipaddrptr = resolv_lookup((char *)data)) != NULL) {
|
||||
connection = ftpc_connect(ipaddrptr, HTONS(21));
|
||||
connection = ftpc_connect(ipaddrptr, UIP_HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
} else {
|
||||
show_statustext("Host not found: ", hostname);
|
||||
|
@ -515,15 +515,15 @@ PROCESS_THREAD(ftp_process, ev, data)
|
|||
show_statustext("Resolving host ", hostname);
|
||||
break;
|
||||
}
|
||||
connection = ftpc_connect(ipaddrptr, HTONS(21));
|
||||
connection = ftpc_connect(ipaddrptr, UIP_HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
} else {
|
||||
connection = ftpc_connect(&ipaddr, HTONS(21));
|
||||
connection = ftpc_connect(&ipaddr, UIP_HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
}
|
||||
#else /* UIP_UDP */
|
||||
uiplib_ipaddrconv(hostname, &ipaddr);
|
||||
connection = ftpc_connect(&ipaddr, HTONS(21));
|
||||
connection = ftpc_connect(&ipaddr, UIP_HTONS(21));
|
||||
show_statustext("Connecting to ", hostname);
|
||||
#endif /* UIP_UDP */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue