From 7d9ef5af202a6fca99b624ea179fa129324bcaee Mon Sep 17 00:00:00 2001 From: beveloper Date: Tue, 29 Oct 2002 23:38:46 +0000 Subject: [PATCH] avoid collision with git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1775 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/support/ByteOrder.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/headers/os/support/ByteOrder.h b/headers/os/support/ByteOrder.h index 62f5a01de3..8969c70f6c 100644 --- a/headers/os/support/ByteOrder.h +++ b/headers/os/support/ByteOrder.h @@ -127,10 +127,12 @@ extern uint16 __swap_int16(uint16 uarg); /*-------------------------------------------------------------*/ /*---------Berkeley macros -----------------------------------*/ -#define htonl(x) B_HOST_TO_BENDIAN_INT32(x) -#define ntohl(x) B_BENDIAN_TO_HOST_INT32(x) -#define htons(x) B_HOST_TO_BENDIAN_INT16(x) -#define ntohs(x) B_BENDIAN_TO_HOST_INT16(x) +#ifndef htonl /* avoid collision with */ + #define htonl(x) B_HOST_TO_BENDIAN_INT32(x) + #define ntohl(x) B_BENDIAN_TO_HOST_INT32(x) + #define htons(x) B_HOST_TO_BENDIAN_INT16(x) + #define ntohs(x) B_BENDIAN_TO_HOST_INT16(x) +#endif #ifdef __cplusplus }