I have at last fixed this bug in r610. The solution was simply to remove all that wrong, duplicated code and simply include Python.h. I couldn't think of any reason why not to do it, and that code has been there since day zero.
I guess the original reason was to avoid a dependency on the python-dev package, but I can't be sure. Anyway, it does not make any sense on modern Linux platforms (nor Windows or Mac). On mar, 2009-02-03 at 09:41 -0800, [email protected] wrote: > > > On Jan 24, 12:00 pm, Giovanni Bajo <[email protected]> wrote: > > > Wow, interesting... I didn't even know that those lines were there... > > before applying this patch (which btw doesn't compile on Windows which > > doesn't define "ssize_t") I would like to double-check why we can't > > simply include "Python.h" instead of having this code here. Probably the > > idea was to be able to compile the bootloader without having Python > > includes around; but the includes are shipped with Python even on > > Windows, so I don't see the big deal. > > > > I'll investigate. Thanks! > > -- > > Giovanni Bajo > > Develer S.r.l.http://www.develer.com > > According to this MSDN page, type ssize_t is defined, but it's > SSIZE_T. Perhaps the name is case sensitive. I don't know that much > about VS so all I can do is point out some information and hope > someone with more Windows coding experience can make sense of it. > > http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx > > Also, if ssize_t or SSIZE_T is not defined, it should be okay to > define it as typedef LONG_PTR > > From above MSDN page: > > SSIZE_T Signed SIZE_T. > This type is declared in BaseTsd.h as follows: > typedef LONG_PTR SSIZE_T; > > > [after reading python 2.5 header files] > This seems to be the way python handles it in pyport.h. Py_intprtr_t > is intptr_t, which seems to be a standard C type. > > 112 #ifdef HAVE_SSIZE_T > 113 typedef ssize_t Py_ssize_t; > 114 #elif SIZEOF_VOID_P == SIZEOF_SIZE_T > 115 typedef Py_intptr_t Py_ssize_t; > 116 #else > 117 # error "Python needs a typedef for Py_ssize_t in pyport.h." > 118 #endif > > > > -- Giovanni Bajo Develer S.r.l. http://www.develer.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/PyInstaller?hl=en -~----------~----~----~----~------~----~------~--~---
