mirror of
https://github.com/google/snappy.git
synced 2024-11-28 05:44:33 +00:00
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:
parent
1ff9be9b8f
commit
8f88deb1ef
|
@ -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_
|
||||||
|
|
Loading…
Reference in a new issue