Supporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau!
authorAaron Ballman <aaron@aaronballman.com>
Thu, 4 Jul 2013 14:12:25 +0000 (14:12 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 4 Jul 2013 14:12:25 +0000 (14:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185627 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/DataTypes.h.cmake
include/llvm/Support/DataTypes.h.in

index 7484abd3686877ba5b7b7c10f0d65e84421dcaed..1dcec0588fa1f5bb7c9f5e0b26f8e076d8c59b1d 100644 (file)
@@ -101,7 +101,11 @@ typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
-typedef signed int ssize_t;
+#if defined(_WIN64)
+  typedef signed __int64 ssize_t;
+#else
+  typedef signed int ssize_t;
+#endif
 #ifndef INT8_MAX
 # define INT8_MAX 127
 #endif
index b9fb48a1d498b2794f8e4f086ad8695b6c27f4b3..d6c38169504e69398c808c420c0fd555dad7dd3d 100644 (file)
@@ -98,7 +98,12 @@ typedef short int16_t;
 typedef unsigned short uint16_t;
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
-typedef signed int ssize_t;
+#if defined(_WIN64)
+  typedef signed __int64 ssize_t;
+#else
+  typedef signed long ssize_t;
+#endif
+
 #ifndef INT8_MAX
 # define INT8_MAX 127
 #endif