From: Aaron Ballman Date: Thu, 4 Jul 2013 14:12:25 +0000 (+0000) Subject: Supporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=98abba7b661502f71a090ab254fb3f0db248c4c6;p=oota-llvm.git Supporting ssize_t on WIN64 with its proper size. Patch thanks to David Cournapeau! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185627 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/DataTypes.h.cmake b/include/llvm/Support/DataTypes.h.cmake index 7484abd3686..1dcec0588fa 100644 --- a/include/llvm/Support/DataTypes.h.cmake +++ b/include/llvm/Support/DataTypes.h.cmake @@ -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 diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in index b9fb48a1d49..d6c38169504 100644 --- a/include/llvm/Support/DataTypes.h.in +++ b/include/llvm/Support/DataTypes.h.in @@ -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