Fix a compile error on Windows
This commit is contained in:
+18
-1
@@ -18,8 +18,25 @@
|
|||||||
#ifndef WOFF2_BUFFER_H_
|
#ifndef WOFF2_BUFFER_H_
|
||||||
#define WOFF2_BUFFER_H_
|
#define WOFF2_BUFFER_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#if defined(_WIN32)
|
||||||
|
#include <stdlib.h>
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef short int16_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef int int32_t;
|
||||||
|
typedef unsigned int uint32_t;
|
||||||
|
typedef __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#define ntohl(x) _byteswap_ulong (x)
|
||||||
|
#define ntohs(x) _byteswap_ushort (x)
|
||||||
|
#define htonl(x) _byteswap_ulong (x)
|
||||||
|
#define htons(x) _byteswap_ushort (x)
|
||||||
|
#else
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|||||||
Reference in New Issue
Block a user