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

Fix missing and conditional includes, #warning on MSVC

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