Browse thread
Distinguish between osx and linux programmatically
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] Distinguish between osx and linux programmatically |
On Thu, Jul 08, 2010 at 12:02:48PM +0200, Daniel Bünzli wrote: > Is there something in the standard library that allows me to > distinguish between oxs and linux (Sys.os_type just returns "Unix" for > both). How about running the external "uname" program. On Mac OS X it prints: $ uname Darwin On all Linux distros it prints: $ uname Linux Of course, only run external "uname" if Sys.os_type = "Unix". Rich. -- Richard Jones Red Hat