|
On 5 Oct 2006, at 01:02, Glenn Maynard wrote:
On Wed, Oct 04, 2006 at 04:29:15PM -0700, Sam Roberts wrote:
% grep CLK_TCK /usr/include/bits/time.h# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */CLK_TCK has been around a while, I don't think linux is going to breakall that old software even if it isn't pedantically correct.Looks like a simple hack, but one that should be phased out in newer software. It seems like using the sysconf interface really is theright thing to be doing, in any actively-maintained code--not critical,but not an update I'd I'd expect to see much friction against.
Indeed. It would seem, from a bit of googling, that CLK_TCK went (from the standards) a long time ago. sysconf is a crucial cornerstone of POSIX, not an arcane interface. Well, I suppose it might be both. :)
It was my understanding that most installations of GCC / glibc allowed posix programs to compiler using -pedantic as long as the posix programs were pedantically correct. That is, they had a:
#define _POSIX_C_SOURCE 199209declaration (or similar). lposix.c should probably have one. Good luck choosing the right one.
drj