3rd attempt to fix ssize_t problem in MSVC and mingw
authorBenoit Bolsee <benoit.bolsee@online.be>
Thu, 24 Sep 2009 10:41:28 +0000 (10:41 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Thu, 24 Sep 2009 10:41:28 +0000 (10:41 +0000)
source/blender/blenlib/BLI_winstuff.h

index 69dbb0acdb9bae02d923900f53bac2669f879a89..3de4981417a17630598be6f11069a790be5d71fb 100644 (file)
@@ -91,12 +91,13 @@ extern "C" {
 typedef unsigned int mode_t;
 #endif
 
+/* mingw using _SSIZE_T_ to declare ssize_t type */
 #ifndef _SSIZE_T_
 #define _SSIZE_T_
-#if defined(_WIN64)
-typedef __int64 ssize_t;
-#else
-typedef _W64 int ssize_t;
+/* python uses HAVE_SSIZE_T */
+#ifndef HAVE_SSIZE_T
+#define HAVE_SSIZE_T 1
+typedef long ssize_t;
 #endif
 #endif