New submission from Cournapeau David <da...@ar.media.kyoto-u.ac.jp>:
I believe the current pyport.h for windows x64 has some problems. It does not work for compilers which are not MS ones, because building against the official binary (python 2.6) relies on features which are not enabled unless MS_WIN64 is defined, and the later is not defined if an extension is not built with MS compiler. As a simple example: #include <Python.h> int main() { printf("sizeof(Py_intptr_t) = %d\n", sizeof(Py_intptr_t)); return 0; } If you build this with MS compiler, you get the expected sizeof(Py_intptr_t) = 8, but with gcc, you get 4. Now, if I build the test like: gcc -I C:\Python26\include -DMS_WIN64 main.c Then I got 8 as well. I believe the attached patch should fix the problem (I have not tested it, since building python on amd64). ---------- components: Build files: mingw-w64.patch keywords: patch messages: 78140 nosy: cdavid severity: normal status: open title: Mingw-w64 and python on windows x64 type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file12411/mingw-w64.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4709> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com