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.
This commit is contained in:
Harald Fernengel 2014-05-29 12:42:25 +02:00
parent 1ff9be9b8f
commit 8f88deb1ef
1 changed files with 3 additions and 0 deletions

View File

@ -486,6 +486,9 @@ inline char* string_as_array(string* str) {
return str->empty() ? NULL : &*str->begin(); return str->empty() ? NULL : &*str->begin();
} }
// Windows doesn't have ssize_t, so create one in the namespace snappy
typedef std::make_signed<size_t>::type ssize_t;
} // namespace snappy } // namespace snappy
#endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_ #endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_