Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-24 Thread Ian Zimmerman
David If libffi were like the C/C++ libraries and available David consistently on all platforms there would be no need to consider David including it in the source. However, it's becoming clear that on David a significant range of platforms using it would require users to David install libffi

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-21 Thread David Matthews
On 18/11/2011 13:49, Phil Clayton wrote: With Fedora, there is a minor configuration issue: like many packages, libffi headers are not installed on a standard path, so relies on pkg-config to supply cflags/libs arguments. I was able to build by simply adding symbolic links in /usr/include. After

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-21 Thread Phil Clayton
On 21/11/11 11:33, David Matthews wrote: On 18/11/2011 13:49, Phil Clayton wrote: With Fedora, there is a minor configuration issue: like many packages, libffi headers are not installed on a standard path, so relies on pkg-config to supply cflags/libs arguments. I was able to build by simply

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-21 Thread David Matthews
On 21/11/2011 14:19, Phil Clayton wrote: On 21/11/11 11:33, David Matthews wrote: This now works on Fedora 15 x86_64 without the symbolic links. I also tested Fedora 12 x86_64 with and without the libffi-devel package and both scenarios worked 'out of the box' i.e. no sym links required. I also

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-18 Thread Phil Clayton
On 17/11/11 19:40, David Matthews wrote: On 16/11/2011 20:27, Phil Clayton wrote: On 16/11/11 18:27, David Matthews wrote: On 16/11/2011 18:07, Phil Clayton wrote: Right. Those preprocessor symbols are wrong. I think I changed them elsewhere in the code and somehow those got missed. I think

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-18 Thread David Matthews
On 18/11/2011 13:49, Phil Clayton wrote: On 17/11/11 19:40, David Matthews wrote: Well, having decided that the existing code is horrible I bit the bullet and investigated libffi more closely. It turns out that it does everything we need including callbacks. I've now modified the

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-16 Thread David Matthews
On 16/11/2011 18:07, Phil Clayton wrote: The calling conventions for x86_64 appear to pass via registers not only the initial floating point arguments but also the initial int/pointer arguments: http://en.wikipedia.org/wiki/X86_calling_conventions So I suspect all arguments, not just floating

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-16 Thread Phil Clayton
On 16/11/11 18:27, David Matthews wrote: On 16/11/2011 18:07, Phil Clayton wrote: The calling conventions for x86_64 appear to pass via registers not only the initial floating point arguments but also the initial int/pointer arguments: http://en.wikipedia.org/wiki/X86_calling_conventions So I

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-15 Thread David Matthews
Phil, I think it could be possible to provide CInterface.null as a persistent vol pointing to a value containing (void*)0. I know that seems a contradiction but it should be possible. I'm just not sure it's necessary. Why do you need to have null and isNull? Have you considered instead

Re: [polyml] Null pointer and comparing CInterface.vol values

2011-11-15 Thread Phil Clayton
David, My situation is slightly unusual so perhaps it's useful/interesting to explain some background. I'm working on support for GLib/GTK in SML which involves a significant number of calls to C functions. These C functions need wrapping to provide a suitable ML interface for various