From: David Allsopp <dra-news@metastack.com>
To: "oliver@first.in-berlin.de" <oliver@first.in-berlin.de>,
"caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Distinguish between osx and linux programmatically
Date: Thu, 8 Jul 2010 17:22:15 +0000 [thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9095816@Remus.metastack.local> (raw)
In-Reply-To: <20100708171743.GA2178@first.in-berlin.de>
Oliver Bandel wrote:
> On Thu, Jul 08, 2010 at 06:01:24PM +0100, Richard Jones wrote:
> > On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote:
> > > Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit :
> > > > Stdlib could bind the uname(2) syscall, but it's legendary in its
> > > > complexity. Seems more likely to cause problems than just calling
> > > > out to the external program.
> > >
> > > I fail to see the complexity.. Where is it ?
> >
> > Actually *I* misunderstood the link I posted
> > (http://www.kernel.org/doc/man-pages/online/pages/man2/uname.2.html#NO
> > TES) thinking it meant that the string fields in the structure could
> > have variable width. Reading it again, they don't.
> >
> > Nevertheless I still think this is not a useful addition to stdlib,
> > but for different reasons:
> >
> > (1) You'd have to emulate it on non-Unix platforms, but it's unclear
> > what you'd emulate it with. Windows has a completely different and
> > much richer concept of OS version. This sort of version probing
> > complexity doesn't belong in the core library, but in an external "OS
> > version" library where detection rules can be frequently updated.
> [...]
>
>
> $ uname -a
>
> If it's not Unix, what will uname(2) or uname(1) give you?
>
> What will be reported on Windows with MinGW
C:\Users\DRA>uname -a
windows32 Tenor 2.6.1 7600 i686-pc Intel unknown MinGW
(using GnuWin32 which is a MinGW build of the Unix tools)
> or Cygwin?
DRA@Tenor ~
$ uname -a
CYGWIN_NT-6.1-WOW64 Tenor 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
But of course in both instances that requires uname.exe to be installed which it won't be on most normal end-user systems.
David
next prev parent reply other threads:[~2010-07-08 17:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 10:02 Daniel Bünzli
2010-07-08 10:23 ` [Caml-list] " Richard Jones
2010-07-08 10:48 ` Alex
2010-07-08 11:09 ` Daniel Bünzli
2010-07-08 11:44 ` Richard Jones
2010-07-08 15:42 ` Romain Beauxis
2010-07-08 17:01 ` Richard Jones
2010-07-08 17:17 ` oliver
2010-07-08 17:22 ` David Allsopp [this message]
2010-07-08 18:22 ` Török Edwin
2010-07-08 17:47 ` Romain Beauxis
2010-07-08 17:23 ` oliver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E51C5B015DBD1348A1D85763337FB6D9095816@Remus.metastack.local \
--to=dra-news@metastack.com \
--cc=caml-list@yquem.inria.fr \
--cc=oliver@first.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox