Commit 05eba1b0 authored by Harris Hancock's avatar Harris Hancock

Fix missing and conditional includes, #warning on MSVC

parent 35399407
......@@ -23,7 +23,9 @@
#include "md5.h"
#include <capnp/dynamic.h>
#include <kj/debug.h>
#if !_MSC_VER
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -185,9 +185,14 @@ using WireValue = SwappingWireValue<T>;
// Unknown endianness. Fall back to bit shifts.
#if !CAPNP_DISABLE_ENDIAN_DETECTION
#if _MSC_VER
#pragma message("Couldn't detect endianness of your platform. Using unoptimized fallback implementation.")
#pragma message("Consider changing this code to detect your platform and send us a patch!")
#else
#warning "Couldn't detect endianness of your platform. Using unoptimized fallback implementation."
#warning "Consider changing this code to detect your platform and send us a patch!"
#endif
#endif // !CAPNP_DISABLE_ENDIAN_DETECTION
template <typename T, size_t size = sizeof(T)>
class ShiftingWireValue;
......
......@@ -26,6 +26,7 @@
#include <kj/async.h>
#include <kj/one-of.h>
#include <kj/function.h>
#include <functional> // std::greater
#include <unordered_map>
#include <map>
#include <queue>
......
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