diff mercurial/compat.h @ 39610:11ed2eadf937

cext: fix warnings when building for py3 on Windows MSVC++ 14 now has standard int types that don't need to be redefined (I didn't go back to see when they came along since the build system wants either 2008 or 2015), but doesn't have ssize_t. The FILE pointer in posixfile is only used on python2.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 13 Sep 2018 17:32:20 -0400
parents f4433f2713d0
children d86908050375
line wrap: on
line diff
--- a/mercurial/compat.h	Thu Sep 13 12:43:50 2018 -0400
+++ b/mercurial/compat.h	Thu Sep 13 17:32:20 2018 -0400
@@ -3,6 +3,7 @@
 
 #ifdef _WIN32
 #ifdef _MSC_VER
+#if _MSC_VER < 1900
 /* msvc 6.0 has problems */
 #define inline __inline
 #if defined(_WIN64)
@@ -21,6 +22,18 @@
 typedef unsigned long uint32_t;
 typedef unsigned __int64 uint64_t;
 #else
+/* VC++ 14 */
+#include <stdint.h>
+
+#if defined(_WIN64)
+typedef __int64 ssize_t;
+#else
+typedef int ssize_t;
+#endif
+#endif /* _MSC_VER < 1900 */
+
+#else
+/* not msvc */
 #include <stdint.h>
 #endif
 #else