Closed GoogleCodeExporter closed 9 years ago
Sorry but I did not mean a minor glitch, but actually a compiler error. The
above patch allows a successful compilation.
Original comment by fal...@gmail.com
on 29 Dec 2013 at 9:23
Hi,
This has been discussed in previous bugs; the short version is that your
config.h file is expected to supply this macro, not snappy.h. This patch would
be wrong for MinGW, and in general, we try to avoid too many compiler-specific
incantations outside config.h, which is where they belong.
Original comment by se...@google.com
on 30 Dec 2013 at 11:09
Ah, I see, sorry. At any rate, in case anyone else finds this report, the next
patch works well in both MSVC and MINGW setups:
--- a/snappy-1.1.1/snappy.h
+++ b/snappy-1.1.1/snappy.h
@@ -44,6 +44,14 @@
#include "snappy-stubs-public.h"
+// Windows does not define ssize_t by default. This is a workaround.
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
+
namespace snappy {
class Source;
class Sink;
Original comment by fal...@gmail.com
on 30 Dec 2013 at 12:25
Original issue reported on code.google.com by
fal...@gmail.com
on 29 Dec 2013 at 9:21