Issue 6243 - My Linux box lacks CLK_TCK, which makes /source/datetime/ttime.cxx not to compile
Summary: My Linux box lacks CLK_TCK, which makes /source/datetime/ttime.cxx not to com...
Status: CLOSED DUPLICATE of issue 3482
Alias: None
Product: utilities
Classification: Unclassified
Component: code (show other issues)
Version: 641
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-02 13:26 UTC by icepic
Modified: 2002-07-18 11:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description icepic 2002-07-02 13:26:59 UTC
I have tried to read the include-files over and over, and can't grasp why
CLK_TCK isn't defined. Also, the fix in the later versions (according to the
web-cvs) tries to use _SC_CLK_TCK, but this isn't picked up either.
(I doing this on RedHat7.2-x86 gcc3.04)

Since time.h in some cases declared CLK_TCK as CLOCKS_PER_SEC (as used later on
in ttime.cxx) I've replaced CLK_TCK with CLOCKS_PER_SEC and then it compiles, but
I don't really know if that is ok.
Since the machine is rather stock RH-install, I can't see how it never was an
issue for anyone before?
Comment 1 icepic 2002-07-02 13:48:38 UTC
Well, it doesnt lack the definition, it just never gets defined.
The string CLK_TCK is in time.h of course, but the #ifdef's seems to
get it unparsed.
Quote:
/* 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
Comment 2 hennes.rohling 2002-07-02 14:32:34 UTC
Actually the OOo build requirements for Linux are gcc 3.02 or gcc
2.95.2 as mentioned on 

http://www.openoffice.org/dev_docs/source/build_linux.html#BuildRequirements

With that compiler the time.h CLK_TCK is defined if
!defined(__STRICT_ANSI) || defined(__USE_POSIX).
Comment 3 icepic 2002-07-02 16:06:02 UTC
Now there, I've built gcc3.0.2 and restarted a fresh compile of
OOo. Same error.
Somehow, I didn't think the gcc folks would change to/from
__STRICT_ANSI__ or __USE_XOPEN2K overnight going form 3.0.2 to 3.0.4.

Comment 4 hennes.rohling 2002-07-09 13:10:12 UTC
hro@hjs: Can please tell how to workaround this problem. Guess this 
is a know issue. I didn't found the thread in porting.dev you 
mentioned.
Comment 5 hjs 2002-07-09 13:21:21 UTC
see patch in fixed issue #3482

*** This issue has been marked as a duplicate of 3482 ***
Comment 6 hjs 2002-07-18 11:27:03 UTC
...