summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librabbitmq/amqp.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 01158cf..a7c1771 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -107,6 +107,22 @@ struct iovec;
# endif
# define AMQP_CALL __cdecl
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# include <sys/uio.h>
+# define AMQP_PUBLIC_FUNCTION \
+ __attribute__ ((visibility ("default")))
+# define AMQP_PUBLIC_VARIABLE \
+ __attribute__ ((visibility ("default"))) extern
+# define AMQP_CALL
+#else
+# define AMQP_PUBLIC_FUNCTION
+# define AMQP_PUBLIC_VARIABLE extern
+# define AMQP_CALL
+#endif
+
+/* Define ssize_t on Win32/64 platforms
+ See: http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-April/030649.html for details
+ */
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#define _W64 __w64
@@ -123,19 +139,6 @@ typedef _W64 int ssize_t;
#endif
#endif
-#elif defined(__GNUC__) && __GNUC__ >= 4
-# include <sys/uio.h>
-# define AMQP_PUBLIC_FUNCTION \
- __attribute__ ((visibility ("default")))
-# define AMQP_PUBLIC_VARIABLE \
- __attribute__ ((visibility ("default"))) extern
-# define AMQP_CALL
-#else
-# define AMQP_PUBLIC_FUNCTION
-# define AMQP_PUBLIC_VARIABLE extern
-# define AMQP_CALL
-#endif
-
#include <stddef.h>
#include <stdint.h>