don't rely on <sys/byteswap.h> having BSWAP_?? define

because it isn't on < Solaris 10
This commit is contained in:
Duncan Laurie 2004-03-03 21:21:21 +00:00
parent 41a64a0f93
commit 8f48a7021a

View File

@ -45,8 +45,6 @@
# include <byteswap.h>
# define BSWAP_16(x) bswap_16(x)
# define BSWAP_32(x) bswap_32(x)
#elif HAVE_SYS_BYTEORDER_H
# include <sys/byteorder.h>
#else
# define BSWAP_16(x) ((((x) & 0xff00) >> 8) | (((x) & 0x00ff) << 8))
# define BSWAP_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) |\