On Thu, Mar 27, 2008 at 1:29 PM, Jonathan Pryor <[EMAIL PROTECTED]> wrote:
> Your OSDetection.IsOSX code can be simplified greatly by using
> Mono.Posix.dll in Mono 1.9:
>
> static bool IsOSX {
> get {
> if (IsWindows)
> return false;
> Mono.Unix.Native.Utsname buf;
> if (Mono.Unix.Native.Syscall.uname (out buf) ==
> 0) {
> return string.Compare(buf.sysname, "darwin",
> true) == 0
> }
> return false;
> }
> }
>
> See also:
>
> http://www.go-mono.com/docs/index.aspx?link=T%3aMono.Unix.Native.Utsname%2f*
> http://www.go-mono.com/docs/[EMAIL PROTECTED]
>
> - Jon
Won't the JIT explode if this is called on MS.NET?
--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list