[GiNaC-list] small portability fix

Richard B. Kreckel kreckel at ginac.de
Thu Nov 3 23:05:30 CET 2005


Dear Alexei,

Sheplyakov Alexei wrote:

>OK, here is another patch. It uses getrusage() whenever available
>and std::clock() as a last resort.
>  
>
Thanks a lot.  It looks better, but two little issues remain:

>diff -r1.21.2.5 configure.ac
>24c24,25
>< AC_CONFIG_HEADERS(config.h)
>---
>  
>
>>AC_CONFIG_AUX_DIR(config)
>>AC_CONFIG_HEADERS([config/config.h])
>>    
>>
Any reason to add another directory?

>>	double elapsed;
>>	if (running())
>>		used2 = clock();
>>	elapsed = (used2 - used1)/CLOCKS_PER_SEC;
>>
This looks wrong to me: used1 and used2 are of type time_t.  On a UNIX 
system, that's an integral type, as is CLOCKS_PER_SEC.  Is it a floating 
point type on MinGW?

Regards
  -richy.

-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the GiNaC-list mailing list