| Karim Belabas on Sat, 18 Sep 2004 18:16:59 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Alpha C++ FTB |
* 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.
Thanks !
Karim.
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]