[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compiling lposix.c (patch)
- From: David Jones <drj@...>
- Date: Thu, 5 Oct 2006 20:32:31 +0100
On 5 Oct 2006, at 18:51, Sam Roberts wrote:
On Thu, Oct 05, 2006 at 11:46:56AM +0100, David Jones wrote:
Indeed. It would seem, from a bit of googling, that CLK_TCK went
(from the standards) a long time ago. sysconf is a crucial
"the standards"? X/Open defines CLK_TCK, warning that it might not
be a
compile time constant (which it isn't on linux). The Single Unix
Specification, v2 also continues to define it, as far as I can tell.
Wasn't SUSV2 replaced like _ages_ ago? Almost as long as c99
"replaced" c90? :)
Care to quote chapter and verse on that?
I'm slowly losing my grip (happily) between the exact relationship
between SUS, POSIX, and Open Group. I note that:
http://www.opengroup.org/onlinepubs/007904875/
"The Open Group Base Specification Issue 6" does note have CLK_TCK
and notes (Change Issue 6 on the history section for <time.h>) that:
"The symbolic name CLK_TCK is removed". Apparently in order to align
the spec with ISO POSIX-1:1996 .
And more importantly, nobody has posted here that *it doesn't work*.
It doesn't work! On OS X 10.4.
And I tried the _POSIX_C_SOURCE=1 voodoo.
cornerstone of POSIX, not an arcane interface. Well, I suppose it
might be both. :)
Guys, just because a new standard comes along, it doesn't mean that
you
should change your code so it only works on new systems, or that all
the old code is suddenly "wrong"!
Notice how the lua source doesn't use "//"-style comments? Those are
ANSI C now, but when you build lua for some grotty cell phone with an
ancient C compiler, you will be thankful lua doesn't use //, even
if it
is ANSI C.
And on a similar note, can we stop calling ISO C "ANSI C". It wasn't
long after the publication of ISO C (ISO 9899) that ANSI replaced
their standard with the one from ISO.
Personally the more I look at more standards the more I see them
becoming less and less relevant. As you point out, you would be,
let's say adventurous, to start making a widely deployed C program
that relied on ISO 9899:1999 features (or even 9899:1995 features
come to that).
p.s.
Though some hasty zealots cry "not so; the Millenium is come, and
this
saying is obsolete and no longer need be supported", verily there be
many, many ancient systems in the world, and it is the decree of the
dreaded god Murphy that thy next employment just might be on one.
While thou sleepest, he plotteth against thee. Awake and take care.
- The annotation to the 9th commandment for C programmers
Maybe your external identifiers can be longer than 6 characters,
though :-)
I once had the pleasure of porting code to a system that was nearly
that bad. 7 characters were significant in external identifiers.
Not case sensitive mind.
drj