summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2012-05-25 14:04:08 -0600
committerMichael Steinert <mike.steinert@gmail.com>2012-05-27 10:39:58 -0600
commitcd9b5141e68b4d09ecc251f5b8b9a8809132c059 (patch)
tree4e62a39e713915c8adf292f1c2135da805d649b2
parenta9f429d35134b04c434b4d8242909ba4fa7e0a76 (diff)
downloadrabbitmq-c-github-ask-cd9b5141e68b4d09ecc251f5b8b9a8809132c059.tar.gz
Define `ssize_t` for MSVC builds
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
-rw-r--r--librabbitmq/amqp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 31105ec..fd87bad 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -107,6 +107,22 @@ struct iovec;
# endif
# define AMQP_CALL __cdecl
+#if !defined(_W64)
+#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
+#define _W64 __w64
+#else
+#define _W64
+#endif
+#endif
+
+#ifdef _MSC_VER
+#ifdef _WIN64
+typedef __int64 ssize_t;
+#else
+typedef _W64 int ssize_t;
+#endif
+#endif
+
#elif defined(__GNUC__) && __GNUC__ >= 4
# include <sys/uio.h>
# define AMQP_PUBLIC_FUNCTION \