Apache OpenOffice (AOO) Bugzilla – Issue 3482
CLK_TCK undefined while building with gcc-3.0.4
Last modified: 2003-03-16 20:14:37 UTC
Hi, While building OOo 641c for Mandrake Linux 8.2, I hit an undefined CLK_TCK macro when compiling with gcc-3.0.4 and STLport 4.5.3. Replacing CLK_TCK (obsolete) with CLOCKS_PER_SEC is of no use. Indeed, they happen to *not* have the same value. As a consequence, the setup windows refreshing is quite irregular and everything _looks_ frozen. The following patch works for me modulo inclusion of <unistd.h> for LINUX targets. Your mileage may vary. --- oo_641c_src/tools/source/datetime/ttime.cxx.gcc3 Mon Jun 11 19:17:46 2001 +++ oo_641c_src/tools/source/datetime/ttime.cxx Thu Feb 21 19:44:52 2002 @@ -73,7 +73,7 @@ #include <dos.h> #elif defined UNX #include <limits.h> -#ifdef IRIX +#if defined( IRIX ) || defined( UNX ) #include <unistd.h> #endif #include <sys/times.h> @@ -493,7 +493,13 @@ if ( !nImplTicksPerSecond ) { +#if defined( CLK_TCK ) nImplTicksPerSecond = CLK_TCK; +#elif defined( _SC_CLK_TCK ) + nImplTicksPerSecond = sysconf(_SC_CLK_TCK); +#else +#error "I don't know how to get CLK_TCK, you lose." +#endif dImplTicksPerSecond = nImplTicksPerSecond; dImplTicksULONGMAX = (double)(ULONG)ULONG_MAX; } Bye, Gwenole.
*** Issue 3398 has been marked as a duplicate of this issue. ***
please use the attachment tool in IssueZilla to submit patches (copy and paste from here creates nasty tabs)
Created attachment 1247 [details] Patch against OOo 641c for CLK_TCK definition & gcc3 builds
Hi, sorry, I did not wanted to be nitpicking... The patch is in on OO641C anyway and will be merged later. a.
*** Issue 6243 has been marked as a duplicate of this issue. ***
As discussed with Armin, he thought these bug were closed, he sees all of them as verified.