T.R | Title | User | Personal Name | Date | Lines |
---|
9117.1 | Forget the standards the thing has to work first | NETRIX::"[email protected]" | mark | Tue Mar 11 1997 22:53 | 11 |
| The correct answer can not be long ! Why you ask. Long on Digital
UNIX will get you a nice 64bit quantity (8 bytes) hostid is
most definitely a 32bit quantity (4 bytes). This looks like
a some standards body work. Got any good jokes about standards
bodies. :)
Cheers
Mark :)
[Posted by WWW Notes gateway]
|
9117.2 | Hack up unistd.h | NETRIX::"[email protected]" | Brian Haley | Wed Mar 12 1997 10:20 | 31 |
| Hi,
As the owner of the qar I'm compelled to answer.
In order to pass UNIX95 branding:
The function long gethostid(void) shall be declared
with the correct prototype in unistd.h.
(it is).
And:
A call to long gethostid(void) shall return a 32-bit
identifier for the current host.
(it does).
So therefore gethostid is returning an *int*. My advice to you is to
remove the entry in netdb.h (or comment if you wish) and change the
entry in unistd.h to be an int, matching the man page, because that is
what will be returned by the call. We can't just go and do this without
regressing from the standard - we'll get that addressed in Steel.
I guess I don't see the importance of a patch for this, as either
definition won't bite you - you can stuff the returned int in a long
no problem (if you're using the netdb.h definition).
BTW, if this partner is using the returned value of gethostid for some
kind of license-checking, they really should find a better way. Anyone
can set their hostid to anything they wish and possibly bypass the check.
-Brian
[Posted by WWW Notes gateway]
|
9117.3 | 'long' isn't necessarily wrong | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Wed Mar 12 1997 11:52 | 8 |
| > The correct answer can not be long ! Why you ask. Long on Digital
> UNIX will get you a nice 64bit quantity (8 bytes) hostid is
> most definitely a 32bit quantity (4 bytes).
If the standard says the return type is long, what's the problem?
A 32-bit hostid fits into a long (easily, with 32 bits to spare).
And because an int is returned sign-extended in a 64-bit register,
there's no problem with getting the wrong value.
|
9117.4 | A poem. | WTFN::SCALES | Despair is appropriate and inevitable. | Wed Mar 12 1997 13:19 | 29 |
| .1> Got any good jokes about standards bodies. :)
Why, as a matter of fact, yes:
I'M ON A COMMITTEE
Oh, give me your pity -- I'm on a committee,
Which means that from morning to night,
We attend and amend and contend and defend
Without a conclusion in sight.
We confer and concur, we defer and demur
And re-iterate all of our thoughts.
We revise the agenda with frequent addenda
And consider a load of reports.
We compose and propose, we suppose and oppose,
And the points of procedure are fun!
But though various notions are bought up as motions,
There's terribly little gets done.
We resolve and absolve, but never dissolve,
Since it's out the question for us --
What a shattering pity to end our committee,
Where else could we make such a fuss?
[author lost...]
|
9117.5 | Suggestion passed along re: unistd.h... | AMCUCS::SWIERKOWSKI | Quot homines tot sententiae | Wed Mar 12 1997 17:33 | 18 |
| Greetings!
Thanks for the prompt feedback! (especially in .2). The customer mostly just
wanted a "work-around" until the next release, ("Steel" maybe?...). Anyway I
passed along the gist of your reply and await a response.
FWIW, .4 is classic! What a hoot! I think I'll have it engraved on a plaque
above my desk. As someone said somewhere; "Standards are wonderful, you have so
many to choose from...". As for committees in general, if you're up on your
Latin, translate my "/PERSONAL_NAME" string in the note header, cheers...
Tony Swierkowski
Digital Equipment Corporation
Software Partner Engineering
Palo Alto, California
(415) 617-3601
"[email protected]"
|
9117.6 | More standards humor | QUARRY::reeves | Jon Reeves, UNIX compiler group | Thu Mar 13 1997 15:38 | 41 |
| [Note: the accuracy of this account has been questioned. It still
makes a good story.]
How Specs Live Forever
The US Standard railroad gauge (distance between the rails) is 4
feet, 8.5 inches. That's an exceedingly odd number. Why was that
gauge used? Because that's the way they built them in England,
and the US railroads were built by English expatriates.
Why did the English people build them like that? Because the
first rail lines were built by the same people who built the
pre-railroad tramways, and that's the gauge they used.
Why did "they" use that gauge then? Because the people who built the
tramways used the same jigs and tools that they used for
building wagons, which used that wheel spacing.
Okay! Why did the wagons use that odd wheel spacing? Well, if
they tried to use any other spacing the wagons would break on
some of the old, long distance roads, because that's the spacing of
the old wheel ruts.
So who built these old rutted roads? The first long distance
roads in Europe were built by Imperial Rome for the benefit of
their legions. The roads have been used ever since. And the
ruts? The initial ruts, which everyone else had to match for fear
of destroying their wagons, were first made by Roman war
chariots. Since the chariots were made for or by Imperial Rome
they were all alike in the matter of wheel spacing.
Thus, we have the answer to the original questions. The United
State standard railroad gauge of 4 feet, 8.5 inches derives from the
original specification for an Imperial Roman
army war chariot. Specs and Bureaucracies live forever.
So, the next time you are handed a specification and wonder what
horse's ass came up with it, you may be exactly right. Because
the Imperial Roman chariots were made to be just wide enough to
accommodate the back-ends of two war horses.
Professor Tom O'Hare Germanic Lanuages (512) 471-4123
University of Texas at Austin [email protected]
|
9117.7 | An Englishman writes... | IOSG::MARSHALL | | Tue Jun 03 1997 07:49 | 17 |
| The British railway gauge of 4' 8.5" was set by George Stephenson, inventor of
"Locomotion", the "Rocket", et al.
In trying to work out the most suitable dimensions for his rolling stock, he
took an average of the measurements of a number of other passenger- and
goods-carrying vehicles in the area at the time.
It is unlikely that any of these actually had a track of 4' 8.5"; the link with
tramways and width of ruts on roads is probably rather tenuous.
There were in fact several competing gauges at the time (Brunel, notably,
proposed a wider gauge which in retrospect would have been better), but
Stephenson's became accepted as the de-facto standard following the commercial
success of his early railways. Any link with roman chariots is sentimentality I
think rather than engineering cause-and-effect.
Scott
|