[Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Daniel Bünzli
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). Best, Daniel ___ Caml-list mailing list. Subscription management:

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

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 r...@annexia.org 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

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 r...@annexia.org 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

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 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

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 to

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 complexity.

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 r...@annexia.org 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

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 Török Edwin
On Thu, 8 Jul 2010 17:22:15 + David Allsopp dra-n...@metastack.com 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 :