[cffi-devel] cffi-grovel *cpu-word-size-flags*: wrong on Windows/amd64
Hello CFFI developers, There is a following fragment in cffi/grovel/grovel.lisp: (defparameter *cpu-word-size-flags* (ecase (cffi:foreign-type-size :long) (4 (list "-m32")) (8 (list "-m64")))) It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough. AFAIK, there are no official "multilib" mingw64 builds, so -m32/-m64 are unlikely to be too useful nowadays. However, passing wrong word size to gcc prevents it from building correct binaries anyway: if that word size is unsupported, gcc will refuse to compile anything. I ran into this problem with my Windows/amd64 port of SBCL. -- Regards, Anton Kovalenko <http://github.com/akovalenko/sbcl-win32-threads> +7(916)345-34-02 | Elektrostal' MO, Russia
On Fri, Nov 4, 2011 at 12:46 AM, Anton Kovalenko <anton@sw4me.com> wrote:
(defparameter *cpu-word-size-flags* (ecase (cffi:foreign-type-size :long) (4 (list "-m32")) (8 (list "-m64"))))
It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough.
Thanks for your report! Stelian, any objection to making this change before the grovel-cxx merge? -- Luís Oliveira http://r42.eu/~luis/
On Fri, Nov 4, 2011 at 12:53 AM, Luís Oliveira <luismbo@gmail.com> wrote:
It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough.
Thanks for your report!
Stelian, any objection to making this change before the grovel-cxx merge?
We discussed this over IRC, and I've just commited a fix. Cheers, -- Luís Oliveira http://r42.eu/~luis/
participants (2)
-
Anton Kovalenko
-
Luís Oliveira