Move __uint16_swap_uint32, __uint8_swap_uint32 and

__uint8_swap_uint16 inside __GNUC__.

Reviewed by: bde
This commit is contained in:
Brian Somers 2000-10-16 17:06:48 +00:00
parent e296c9c9f7
commit 0910581ff1

View File

@ -66,6 +66,8 @@ unsigned long ntohl __P((unsigned long));
unsigned short ntohs __P((unsigned short));
__END_DECLS
#ifdef __GNUC__
static __inline uint32_t
__uint16_swap_uint32(uint32_t __x)
{
@ -97,12 +99,12 @@ __uint8_swap_uint16(uint16_t __x)
/*
* Macros for network/external number representation conversion.
*/
#ifdef __GNUC__
#define ntohl __uint8_swap_uint32
#define ntohs __uint8_swap_uint16
#define htonl __uint8_swap_uint32
#define htons __uint8_swap_uint16
#endif
#endif /* __GNUC__ */
#define NTOHL(x) ((x) = ntohl(x))
#define NTOHS(x) ((x) = ntohs(x))