Commit 14fe868d authored by Artem Prilutskiy's avatar Artem Prilutskiy

..

parent a42dfefc
......@@ -2,7 +2,6 @@
#include <unistd.h>
#include <string.h>
#include <endian.h>
#include <errno.h>
#include <time.h>
......@@ -28,6 +27,29 @@
}
#endif
#ifdef __linux__
#include <endian.h>
#include <byteswap.h>
#endif
#ifdef __MACH__
#include <mach/mach.h>
#include <machine/endian.h>
#define htobe16(value) OSSwapHostToBigInt16(value)
#define be16toh(value) OSSwapBigToHostInt16(value)
#define htobe32(value) OSSwapHostToBigInt32(value)
#define be32toh(value) OSSwapBigToHostInt32(value)
#define htole16(value) OSSwapHostToLittleInt16(value)
#define le16toh(value) OSSwapLittleToHostInt16(value)
#define htole32(value) OSSwapHostToLittleInt32(value)
#define le32toh(value) OSSwapLittleToHostInt32(value)
#define __bswap_16(value) OSSwapConstInt16(value)
#define __bswap_32(value) OSSwapConstInt32(value)
#endif
#define BUFFER_SIZE 256
#define CONNECTION_ATTEMPT_COUNT 5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment