patch applied (packages/base): Avoid calling varargs functions
using the FFI
marlowsd at gmail.com
Tue May 13 04:20:22 EDT 2008
Don Stewart wrote:
>> Fri May 9 07:53:34 PDT 2008 Simon Marlow <marlowsd at gmail.com>
>> * Avoid calling varargs functions using the FFI
>> Calling varargs functions is explicitly deprecated according to the
>> FFI specification. It used to work, just about, but it broke with the
>> recent changes to the via-C backend to not use header files.
>> M ./Control/Exception.hs -1 +3
>> M ./Debug/Trace.hs -1 +3
>> M ./cbits/PrelIOUtils.c +9
>> M ./include/HsBase.h +3
> The other thing that broke was importing functions from headers also
> used in the rts.
> Try the 'cmath' library, which binds to everything in math.h, lots of
> funky symbol duplicates leading to failure.
Hmm, that's a pain. I think we have to #include math.h in order to
implement the floating point primops, but then we have to know which
functions are declared by math.h and avoid declaring them in the generated
C. I can add more functions to the list of exceptions, I suppose, but it's
non-portable and ugly. I need to think some more about this.
More information about the Cvs-libraries