[llvm] r185627 - Supporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau!

Aaron Ballman aaron at aaronballman.com
Thu Jul 4 07:12:25 PDT 2013


Author: aaronballman
Date: Thu Jul  4 09:12:25 2013
New Revision: 185627

URL: http://llvm.org/viewvc/llvm-project?rev=185627&view=rev
Log:
Supporting ssize_t on WIN64 with its proper size.  Patch thanks to David Cournapeau!

Modified:
    llvm/trunk/include/llvm/Support/DataTypes.h.cmake
    llvm/trunk/include/llvm/Support/DataTypes.h.in

Modified: llvm/trunk/include/llvm/Support/DataTypes.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.cmake?rev=185627&r1=185626&r2=185627&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/DataTypes.h.cmake (original)
+++ llvm/trunk/include/llvm/Support/DataTypes.h.cmake Thu Jul  4 09:12:25 2013
@@ -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

Modified: llvm/trunk/include/llvm/Support/DataTypes.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DataTypes.h.in?rev=185627&r1=185626&r2=185627&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/DataTypes.h.in (original)
+++ llvm/trunk/include/llvm/Support/DataTypes.h.in Thu Jul  4 09:12:25 2013
@@ -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





More information about the llvm-commits mailing list