| diff -urN a/Include/pyport.h b/Include/pyport.h |
| --- a/Include/pyport.h 2012-06-24 21:07:38.061405267 +0100 |
| +++ b/Include/pyport.h 2012-06-24 21:07:38.294405980 +0100 |
| @@ -190,9 +190,11 @@ |
| /* Smallest negative value of type Py_ssize_t. */ |
| #define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1) |
| |
| +/* |
| #if SIZEOF_PID_T > SIZEOF_LONG |
| # error "Python doesn't support sizeof(pid_t) > sizeof(long)" |
| #endif |
| +*/ |
| |
| /* PY_FORMAT_SIZE_T is a platform-specific modifier for use in a printf |
| * format to convert an argument with the width of a size_t or Py_ssize_t. |
| @@ -224,6 +226,8 @@ |
| # define PY_FORMAT_SIZE_T "l" |
| # elif defined(MS_WINDOWS) |
| # define PY_FORMAT_SIZE_T "I" |
| +# elif defined(__MINGW32__) && defined(__USE_MINGW_ANSI_STDIO) |
| +# define PY_FORMAT_SIZE_T "z" |
| # else |
| # error "This platform's pyconfig.h needs to define PY_FORMAT_SIZE_T" |
| # endif |