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

@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: uip_arch.c,v 1.2 2007/09/29 03:57:39 matsutsuka Exp $
* $Id: uip_arch.c,v 1.3 2010/10/19 18:29:04 adamdunkels Exp $
*
*/
/*
@ -130,10 +130,10 @@ _upper_layer_chksum_call:
ld a, h
or a, l
jr nz, _upper_layer_htons
jr nz, _upper_layer_uip_htons
ld hl, #0xffff
jr _upper_layer_ret
_upper_layer_htons:
_upper_layer_uip_htons:
ld a, l
ld l, h
ld h, a