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

@ -156,7 +156,7 @@ uart_circ_buf_has_char(tcirc_buf *cbuf)
* \return val Converted hex value
*/
uint8_t
ntohex(uint8_t val)
uip_ntohex(uint8_t val)
{
/* Convert nibble to hex */
if (val > 9){
@ -178,8 +178,8 @@ ntohex(uint8_t val)
void
itohex(uint8_t val,char *str)
{
*str++ = ntohex(val >> 8);
*str = ntohex(val & 0x0f);
*str++ = uip_ntohex(val >> 8);
*str = uip_ntohex(val & 0x0f);
}
/*---------------------------------------------------------------------------*/