Bill Allombert on Wed, 16 Sep 2009 11:17:09 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Problems with has_log2.c and has_exp2.c

On Wed, Sep 16, 2009 at 09:41:21AM +0200, Jeroen Demeyer wrote:
> Bill Allombert wrote:
>> As far as I see, the issue is two-fold:
>> 1) The file has_exp2.c is not valid in C++, hence this cause Configure
>> to omit HAS_EXP2. The file has_exp2.c would be better written as:
>> #include <math.h>
>> double (*f)(double) = exp2;
>> int main(){ return f != exp2; }
>> (since the prototype is part of the standard)
> Your fixes work, thanks!

Good, I will backport it to pari 2.3.5

> You could also simplify things by casting to void*:
> void *f = (void*)exp2;
> I attach a patch which also fixes has_alarm.c and has_setsid.c in the  
> same way.

Applied in revision 11923, thanks!