Re: System call for OS version info
Re: System call for OS version info
- Subject: Re: System call for OS version info
- From: plumber Idraulico <email@hidden>
- Date: Mon, 16 Oct 2006 02:48:04 +0200
it was humour/joke
+the UNIX philosophy ( Terry Lambert the new pape )
the the the :D :D
it's not THE problem
it's not a story of UNIX philosophy ...
1 secure code -> don't link a base tool against x libs
this is only view i can share
-plum
I both agree and disagree with your philosophy Terry. My app is
"memtest" and it runs as a unix command-line utility in single-user
mode. So yes, I NEED to stay away from frameworks (CF specifically)
because they don't yet work in 64-bit mode. Memtest is a 64-bit app
on 64-bit machines so I can't include anything that won't run on 64-
bit arch's. I'm always looking for kernel-level or other low-level
system calls to gather the info I need. I use sysctl extensively
and it sure would have been nice if there was a low-level call to
get the MacOS version info as well. Gestalt worked great for this
purpose under OS 9. So far, I haven't used anything "non-unix" in
memtest and I intend to keep it that way.
I don't use the system info to decide whether to run or not. It's
used only for debugging purposes when a user reports a runtime
problem with memtest. See my previous post for an example of one
debugging nightmare. Since then, I've been adding more system
information to the logfile so I don't have to bug the user for this
info if they have a problem. Remember the "dlylib" issue with
10.3.9? I wasn't the only app broken by the missing lib. I recall
seeing a bunch of developers having the same problem as me back
then. So although in an ideal world we really shouldn't care what
build we're running under, in the real world it can make a
difference. And when it does, I want all the info I can get about
the user's runtime environment. What I'm saying is that a Gestalt-
type call that would give all the OS info provided by "sw_vers"
would be really nice so XML parsers wouldn't be needed. :-)
Tony
Terry Lambert <email@hidden> wrote:
Well, I'm a kernel person - so anything that avoids linking an XML
library or CF Framework to get the same information is a win in my
book.
Plus, the UNIX philosophy is to build new tools out of old tools,
instead of reinventing the wheel. 8-).
Plus Plus your software really should not care about the build number
or version anyway... so making it harder to get discourages people
writing code for programs to check the version before deciding they
are willing to run.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden