caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alex <alex.mailinglist@gmx.net>
To: "Richard Jones" <rich@annexia.org>,
	"Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Distinguish between osx and linux programmatically
Date: Thu, 8 Jul 2010 12:48:05 +0200	[thread overview]
Message-ID: <20100708104517.GA848@Stubb-2.local> (raw)
In-Reply-To: <20100708102314.GA16057@annexia.org>


Hello,

> > Is there something in the standard library that allows me to
> > distinguish between oxs and linux (Sys.os_type just returns "Unix" for
> > both).
we had a similar problem, but finally (ab)used 
   Ocamlbuild_pack.Ocamlbuild_Myocamlbuild_config.system 
and
   Ocamlbuild_pack.Ocamlbuild_Myocamlbuild_config.arch 
in the context of an ocamlbuild script to get
the system and the current architecture (32 vs
64 bit). just adapt to your demands.

it's the same variable that it accessible via the 
"-config" parameter of the ocamltools (ocamlc/ocamlopt/...)
   shell~> ocamlc -config|grep system
please note, that it's not the runtime configuration
but the system configuration at compile time of your
ocaml distribution.

regards,

alex





  reply	other threads:[~2010-07-08 10:48 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 [this message]
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
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=20100708104517.GA848@Stubb-2.local \
    --to=alex.mailinglist@gmx.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    --cc=rich@annexia.org \
    /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;
as well as URLs for NNTP newsgroup(s).