From 8f88deb1ef177fe92d9770c9889667b84c3d357a Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 29 May 2014 12:42:25 +0200 Subject: [PATCH] Add typedef for ssize_t MSVC doesn't have ssize_t, so add a typedef in snappy-stube-internal.h. This makes MSVC builds compile out of the box without requiring config.h or autotools. --- snappy-stubs-internal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h index 12393b6..f0098d1 100644 --- a/snappy-stubs-internal.h +++ b/snappy-stubs-internal.h @@ -486,6 +486,9 @@ inline char* string_as_array(string* str) { return str->empty() ? NULL : &*str->begin(); } +// Windows doesn't have ssize_t, so create one in the namespace snappy +typedef std::make_signed::type ssize_t; + } // namespace snappy #endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_