[Python-checkins] commit of r41778 - python/branches/ssize_t/PC/pyconfig.h

martin.v.loewis python-checkins at python.org
Tue Dec 20 17:48:49 CET 2005


Author: martin.v.loewis
Date: Tue Dec 20 17:48:48 2005
New Revision: 41778

Modified:
   python/branches/ssize_t/PC/pyconfig.h
Log:
Port ssize_t patch to Windows

Modified: python/branches/ssize_t/PC/pyconfig.h
==============================================================================
--- python/branches/ssize_t/PC/pyconfig.h	(original)
+++ python/branches/ssize_t/PC/pyconfig.h	Tue Dec 20 17:48:48 2005
@@ -117,6 +117,14 @@
 #endif
 #endif /* MS_WIN64 */
 
+/* Define like size_t, omitting the "unsigned" */
+#ifdef MS_WIN64
+typedef __int64 ssize_t;
+#else
+typedef _W64 int ssize_t;
+#endif
+#define HAVE_SSIZE_T 1
+
 #if defined(MS_WIN32) && !defined(MS_WIN64)
 #ifdef _M_IX86
 #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
@@ -253,6 +261,7 @@
 #	define SIZEOF_OFF_T 4
 #	define SIZEOF_FPOS_T 8
 #	define SIZEOF_HKEY 8
+#	define SIZEOF_SIZE_T 8
 /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
    sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
    On Win64 the second condition is not true, but if fpos_t replaces off_t
@@ -267,6 +276,7 @@
 #	define SIZEOF_OFF_T 4
 #	define SIZEOF_FPOS_T 8
 #	define SIZEOF_HKEY 4
+#	define SIZEOF_SIZE_T 4
 #endif
 
 #ifdef _DEBUG


More information about the Python-checkins mailing list