Fix endian.h on Windows (remove the sys/param.h include).

This commit is contained in:
Reece H. Dunn
2016-12-17 14:02:42 +00:00
parent 7946e49092
commit c6d44dd963
+3 -5
View File
@@ -61,10 +61,9 @@
# define be64toh(x) betoh64(x)
# define le64toh(x) letoh64(x)
#elif defined(__WINDOWS__)
# include <winsock2.h>
# include <sys/param.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# include <winsock2.h>
# define htobe16(x) htons(x)
# define htole16(x) (x)
# define be16toh(x) ntohs(x)
@@ -79,8 +78,7 @@
# define htole64(x) (x)
# define be64toh(x) ntohll(x)
# define le64toh(x) (x)
# elif BYTE_ORDER == BIG_ENDIAN
/* that would be xbox 360 */
# elif BYTE_ORDER == BIG_ENDIAN /* that would be xbox 360 */
# define htobe16(x) (x)
# define htole16(x) __builtin_bswap16(x)
# define be16toh(x) (x)