aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Chromium Automerger <chromium-automerger@android>2014-06-06 17:08:52 +0000
committerAndroid Chromium Automerger <chromium-automerger@android>2014-06-06 17:08:52 +0000
commit731f34b714340630c5ff0ee94f8401170d648313 (patch)
tree71eed4477dfc398abdf81fe8952ca04e862e9481
parent3764f16fe2279eb0cf365bc56c5a70d833628b6f (diff)
parent6cef49677dc4c650ef6e3f56041e0a41803afa8c (diff)
downloadsrc-731f34b714340630c5ff0ee94f8401170d648313.tar.gz
Merge third_party/brotli/src from https://chromium.googlesource.com/external/font-compression-reference.git at 6cef49677dc4c650ef6e3f56041e0a41803afa8c
This commit was generated by merge_from_chromium.py. Change-Id: I46222b4d98247fd5bdc0597fc2a012777763a3c9
-rw-r--r--woff2/buffer.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/woff2/buffer.h b/woff2/buffer.h
index f71f6a8..5111c65 100644
--- a/woff2/buffer.h
+++ b/woff2/buffer.h
@@ -18,8 +18,25 @@
#ifndef 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 <stdint.h>
+#endif
+
#include <cstdlib>
#include <cstring>
#include <limits>