|
|
@ -16,18 +16,20 @@
|
|
|
|
// then reverse that, guaranteeing LE. htole(x) == ltohe(x).
|
|
|
|
// then reverse that, guaranteeing LE. htole(x) == ltohe(x).
|
|
|
|
#if defined(__linux__) || defined(__gnu_hurd__)
|
|
|
|
#if defined(__linux__) || defined(__gnu_hurd__)
|
|
|
|
#include <byteswap.h>
|
|
|
|
#include <byteswap.h>
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#define htole(x) (__bswap_32(htonl(x)))
|
|
|
|
#define htole(x) (__bswap_32(htonl(x)))
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <libkern/OSByteOrder.h>
|
|
|
|
#include <libkern/OSByteOrder.h>
|
|
|
|
#define htole(x) (OSSwapInt32(htonl(x)))
|
|
|
|
#define htole(x) (OSSwapInt32(htonl(x)))
|
|
|
|
#elif defined(__MINGW64__)
|
|
|
|
#elif defined(__MINGW64__)
|
|
|
|
#include <winsock.h>
|
|
|
|
#include <winsock.h>
|
|
|
|
#define htole(x) (bswap32(htonl(x)))
|
|
|
|
#define htole(x) (bswap32(htonl(x)))
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <sys/endian.h>
|
|
|
|
#include <sys/endian.h>
|
|
|
|
#define htole(x) (bswap32(htonl(x)))
|
|
|
|
#define htole(x) (bswap32(htonl(x)))
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
#include <notcurses/nckeys.h>
|
|
|
|
#include <notcurses/nckeys.h>
|
|
|
|
#include <notcurses/ncseqs.h>
|
|
|
|
#include <notcurses/ncseqs.h>
|
|
|
|
|
|
|
|
|
|
|
|