[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compiling lposix.c (patch)
- From: Glenn Maynard <glenn@...>
- Date: Fri, 6 Oct 2006 04:10:07 -0400
On Fri, Oct 06, 2006 at 08:52:43AM +0100, David Jones wrote:
> I've now looked at how lposix _uses_ CLK_TCK. It's used to
> manipulate the results of the times(3) call. Which, in OS X, is
> documented as A) obsoleted and B) returning values in CLK_TCK's of a
> second. But sadly, as I've discovered, CLK_TCK isn't defined on OS X
> 10.4 so that makes times(3) completely useless.
That's just a documentation glitch, surely; CLK_TCK is the same thing as
sysconf(_SC_CLK_TCK), other than its deprecatedness. My linux times(2)
manpage says:
NOTES
The number of clock ticks per second can be obtained using
sysconf(_SC_CLK_TCK);
In POSIX-1996 the symbol CLK_TCK (defined in <time.h>) is
mentioned as obsolescent. It is obsolete now.
A platform-specific documentation error doesn't make the function useless,
especially when the function in question is defined by a standard which,
presumably, doesn't make the same error ...
> I'm a great fan of -ansi -pedantic -Wall though.
Don't forget -W, which enables several other useful warnings not
included in -Wall.
--
Glenn Maynard
- References:
- Re: Compiling lposix.c (patch), David Haley
- Re: Compiling lposix.c (patch), Sam Roberts
- Re: Compiling lposix.c (patch), Glenn Maynard
- Re: Compiling lposix.c (patch), Sam Roberts
- Re: Compiling lposix.c (patch), Glenn Maynard
- Re: Compiling lposix.c (patch), David Jones
- Re: Compiling lposix.c (patch), Sam Roberts
- Re: Compiling lposix.c (patch), David Jones
- Re: Compiling lposix.c (patch), Sam Roberts
- Re: Compiling lposix.c (patch), David Jones