On Wed, Apr 18, 2012 at 21:39, Tom Murphy <amindfv@gmail.com> wrote:
On 4/18/12, Brandon Allbery <allbery.b@gmail.com> wrote:
> On Wed, Apr 18, 2012 at 16:18, Tom Murphy <amindfv@gmail.com> wrote:
>> This makes it seem like cabal doesn't have access to _any_ math.h
>> file, but if this were the case, wouldn't I get many more
>> undefined-function errors than I do?
>
> Unless you are using an older ghc with -fvia-C,
[...]
I have 7.0.4.

7.0.4 has -fasm by default, but you can force -fvia-C still.  With -fasm, the include files are not used afaik; since direct assembly code is created and not C code, a C include file is not useful.
 
Hmm, that's true...
I don't really understand how .hsc files are compiled, but isn't the
"#include <math.h>" in cmath done in the very standard FFI style?

If warnings are on, I think that elicits a "this is not used any more" warning with -fasm.

> I note that OS X doesn't have a gamma().  There are lgamma() and tgamma()
> and variations thereon.  (and no related macros in <math.h>, confirming
> that it is not related.)

What do you mean by OS X not having them? On my system (10.6), gamma()

I'm on 10.7, and I have no gamma().

I just checked the 10.6 SDK includes; it has

    extern double gamma ( double ); /* Legacy API: please use C99 tgamma() instead. */

so apparently it was deprecated and is now removed.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms