Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Török Edwin
On Thu, 8 Jul 2010 17:22:15 + David Allsopp wrote: > 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 : > > > > > Stdli

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Romain Beauxis
Le jeudi 8 juillet 2010 12:01:24, Richard Jones a écrit : > Actually I misunderstood the link I posted > (http://www.kernel.org/doc/man-pages/online/pages/man2/uname.2.html#NOTES) > thinking it meant that the string fields in the structure could have > variable width. Reading it again, they don't.

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread oliver
On Thu, Jul 08, 2010 at 01:09:41PM +0200, Daniel Bünzli wrote: > On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones wrote: > > > How about running the external "uname" program. > > Yes, why not. I was hoping that I wouldn't have to resort to that kind > of hacks, that I was missing a function using

RE: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread David Allsopp
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 > > >

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread oliver
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

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Richard Jones
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. >

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Romain Beauxis
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 ? Such a function would also

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Richard Jones
On Thu, Jul 08, 2010 at 01:09:41PM +0200, Daniel Bünzli wrote: > On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones wrote: > > > How about running the external "uname" program. > > Yes, why not. I was hoping that I wouldn't have to resort to that kind > of hacks, that I was missing a function using

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Daniel Bünzli
On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones wrote: > How about running the external "uname" program. Yes, why not. I was hoping that I wouldn't have to resort to that kind of hacks, that I was missing a function using uname(3) directly. On Thu, Jul 8, 2010 at 12:48 PM, Alex wrote: > please

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Alex
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

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Richard Jones
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