tcpblaster: Avoid conflicting with host OS definitions
This commit is contained in:
parent
e8b0c903bc
commit
5f91364d44
@ -51,39 +51,35 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef HTONS
|
#ifdef TCPBLASTER_HOST
|
||||||
# ifdef CONFIG_ENDIAN_BIG
|
#undef HTONS
|
||||||
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
# define HTONS(ns) (ns)
|
# define HTONS(ns) (ns)
|
||||||
# else
|
#else
|
||||||
# define HTONS(ns) \
|
# define HTONS(ns) \
|
||||||
(unsigned short) \
|
(unsigned short) \
|
||||||
(((((unsigned short)(ns)) & 0x00ff) << 8) | \
|
(((((unsigned short)(ns)) & 0x00ff) << 8) | \
|
||||||
((((unsigned short)(ns)) >> 8) & 0x00ff))
|
((((unsigned short)(ns)) >> 8) & 0x00ff))
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HTONL
|
#undef HTONL
|
||||||
# ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
# define HTONL(nl) (nl)
|
# define HTONL(nl) (nl)
|
||||||
# else
|
#else
|
||||||
# define HTONL(nl) \
|
# define HTONL(nl) \
|
||||||
(unsigned long) \
|
(unsigned long) \
|
||||||
(((((unsigned long)(nl)) & 0x000000ffUL) << 24) | \
|
(((((unsigned long)(nl)) & 0x000000ffUL) << 24) | \
|
||||||
((((unsigned long)(nl)) & 0x0000ff00UL) << 8) | \
|
((((unsigned long)(nl)) & 0x0000ff00UL) << 8) | \
|
||||||
((((unsigned long)(nl)) & 0x00ff0000UL) >> 8) | \
|
((((unsigned long)(nl)) & 0x00ff0000UL) >> 8) | \
|
||||||
((((unsigned long)(nl)) & 0xff000000UL) >> 24))
|
((((unsigned long)(nl)) & 0xff000000UL) >> 24))
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NTOHS
|
#undef NTOHS
|
||||||
# define NTOHS(hs) HTONS(hs)
|
#define NTOHS(hs) HTONS(hs)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NTOHL
|
#undef NTOHL
|
||||||
# define NTOHL(hl) HTONL(hl)
|
#define NTOHL(hl) HTONL(hl)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TCPBLASTER_HOST
|
|
||||||
/* Have SO_LINGER */
|
/* Have SO_LINGER */
|
||||||
|
|
||||||
# define FAR
|
# define FAR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user