Bill Allombert on Sat, 18 Sep 2004 22:47:44 +0200


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

Re: Alpha C++ FTB


On Sat, Sep 18, 2004 at 06:07:21PM +0200, Karim Belabas wrote:
> * Phil Carmody [2004-09-12 13:12]:
> > g++  -c -fPIC -O3 -DGCC_INLINE -Wall -fomit-frame-pointer   -I.
> > -I../src/headers -o init.o ../src/language/init.c
> > ../src/language/init.c: In function `long int TIMER(pari_timer*)':
> > ../src/language/init.c:1909: error: `CLK_TCK' undeclared (first use this 
> >    function)
> > ../src/language/init.c:1909: error: (Each undeclared identifier is reported 
> >    only once for each function it appears in.)
> > make: *** [init.o] Error 1
> > 
> > 
> > Hmmmm, what's CLK_TCK... grepping around /usr/include:
> > 
> > /* This is the obsolete POSIX.1-1988 name for the same constant.  */
> > # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
> > #  ifndef CLK_TCK
> > #   define CLK_TCK      CLOCKS_PER_SEC
> > #  endif
> > # endif
> > 
> > Hack, hack, hack, builds fine with CLOCKS_PER_SEC in gcc and g++.
> > 
> > => possible patch, that admittedly might break weird and wonderful
> > anachronistic compilers, of which I see no evidence in the build log list:
> > <<<
> 
> I have committed to CVS a slightly more elaborate patch (from Jeroen
> Demeyer). It tests in Configure whether times() is usable, and uses
> sysconfig if available.

Also I have commited a supplemental patch that make the above mostly 
irrelevant: now alpha-linux use getrusage() instead of times(), like
(almost) every one else.

In fact, I would not be terribly surprised to learn hat the recent
changes break the oddball box that really need times() due to lack of
proper getrusage() since it is very unlikely such a box follow POSIX.

Cheers,
Bill.