Merge "Remove swap16/swap32/swap64 header pollution." am: a2cf3783d4

am: 00e9bfe523

* commit '00e9bfe523a045131142b13a766774f1ee43555e':
  Remove swap16/swap32/swap64 header pollution.
This commit is contained in:
Elliott Hughes 2015-10-27 02:14:39 +00:00 committed by android-build-merger
commit 164bd7349b
2 changed files with 4 additions and 9 deletions

View File

@ -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 <endian.h>
#include <sys/endian.h>
#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_ */

View File

@ -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