Commit fd108f7f authored by Christopher Dykes's avatar Christopher Dykes Committed by facebook-github-bot-4

Minor MSVC issues

Summary:MSVC doesn't let you have unicode characters in a narrow string without using a utf-8 literal string.
AsyncTransport needs the definition of IOBuf because of how the standard library implements a few things.
And longs are only 32-bit under Windows.

Reviewed By: yfeldblum

Differential Revision: D2973973

fb-gh-sync-id: c2f3e848e740a65c575598991d43dd79360ec1e3
shipit-source-id: c2f3e848e740a65c575598991d43dd79360ec1e3
parent a2962ba8
......@@ -74,7 +74,7 @@ class Fingerprint {
public:
Fingerprint() {
// Use a non-zero starting value. We'll use (1 << (BITS-1))
fp_[0] = 1UL << 63;
fp_[0] = 1ULL << 63;
for (int i = 1; i < size(); i++)
fp_[i] = 0;
}
......
......@@ -19,6 +19,7 @@
#include <memory>
#include <sys/uio.h>
#include <folly/io/IOBuf.h>
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/AsyncSocketBase.h>
......@@ -38,7 +39,6 @@ namespace folly {
class AsyncSocketException;
class EventBase;
class IOBuf;
class SocketAddress;
/*
......
......@@ -691,7 +691,7 @@ void escapeString(StringPiece input,
// checking that utf8 encodings are valid
char32_t v = decodeUtf8(q, e, opts.skip_invalid_utf8);
if (opts.skip_invalid_utf8 && v == U'\ufffd') {
out.append("\ufffd");
out.append(u8"\ufffd");
p = q;
continue;
}
......
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