From: Elliott Hughes Date: Tue, 27 Oct 2015 00:51:42 +0000 (-0700) Subject: Remove swap16/swap32/swap64 header pollution. X-Git-Tag: android-x86-7.1-r1~362^2~18^2~14^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=bf4c32df6b7c15c8ca80319410e7d37ddd39240b;p=android-x86%2Fbionic.git Remove swap16/swap32/swap64 header pollution. This seems to be obsolete BSD stuff, and the only references to it in the tree are people #undef'ing it. Bug: http://b/2735009 Change-Id: Icde523ae2d15cf1025357d861f97b415e89e4f9a --- diff --git a/libc/include/byteswap.h b/libc/include/byteswap.h index 74b0e9180..628fb7f3e 100644 --- a/libc/include/byteswap.h +++ b/libc/include/byteswap.h @@ -28,11 +28,10 @@ #ifndef _BYTESWAP_H_ #define _BYTESWAP_H_ -/* endian.h rather than sys/endian.h so we get the machine-specific file. */ -#include +#include -#define bswap_16(x) swap16(x) -#define bswap_32(x) swap32(x) -#define bswap_64(x) swap64(x) +#define bswap_16(x) __swap16(x) +#define bswap_32(x) __swap32(x) +#define bswap_64(x) __swap64(x) #endif /* _BYTESWAP_H_ */ diff --git a/libc/include/sys/endian.h b/libc/include/sys/endian.h index 2fd480dc2..60cc0304c 100644 --- a/libc/include/sys/endian.h +++ b/libc/include/sys/endian.h @@ -75,10 +75,6 @@ __END_DECLS #define HTONL(x) (x) = htonl((u_int32_t)(x)) #define HTONS(x) (x) = htons((u_int16_t)(x)) -#define swap16 __swap16 -#define swap32 __swap32 -#define swap64 __swap64 - #define htobe16 __swap16 #define htobe32 __swap32 #define htobe64 __swap64