[Bug 249336] New: Misdefined/unused CLK_TCK in time.h?
https://bugzilla.novell.com/show_bug.cgi?id=249336
Summary: Misdefined/unused CLK_TCK in time.h?
Product: openSUSE 10.2
Version: Final
Platform: x86-64
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
AssignedTo: pth@novell.com
ReportedBy: pablomme@googlemail.com
QAContact: qa@suse.de
I may well be wrong, as I'm not familiar with C development.
I found this when playing around with a Fortran 90 code which emulates the
ETIME extension via a small C module, which uses time.h and sys/times.h. The
compilation died because CLK_TCK was not defined, so I looked inside time.h and
pasted the definition back into my code [the definition was being ignored in
time.h because __STRICT_ANSI__ was defined, apparently?]:
# ifndef CLK_TCK
# define CLK_TCK CLOCKS_PER_SEC
# endif
However this gives wrong timings. I looked again at time.h and found that it
includes bits/time.h, which instead defines:
# include
https://bugzilla.novell.com/show_bug.cgi?id=249336 pth@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from pth@novell.com 2007-02-27 09:15 MST ------- This is not a bug. As you quoted, the definition in time.h is guarded by '#ifndef CLK_TCK', so it will only be used if CLK_TCK hasn't been defined before. So this is just a safeguard for the unlikely case that it hasn't been defined before. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com