My macbook gives the following:<div><br><div><div>jshaw@minion:~$ uname -a</div><div>Darwin minion.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386</div><div><br>
</div><div>-jason</div><br><div class="gmail_quote">On Tue, Mar 22, 2011 at 9:08 PM, Eric Battersby <span dir="ltr"><<a href="mailto:gyre@vex.net">gyre-Ja3L+HSX0kI@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, 22 Mar 2011, Digimer wrote:<br>
<br>
> On 03/22/2011 12:03 PM, bob 295 wrote:<br>
> > I'm in the process of debugging a Mac version of my SIMPL open source toolkit.<br>
> > With the GNU tools installed on the Mac the SIMPL toolkit compiles straight<br>
> > up without any conditional compilation ifdefs.    However, I've encountered<br>
> > an issue with the shmctl() function.    Linux allows a process to shmat()<br>
> > even if the segment was previously marked for destruction.   The Mac does<br>
> > not.   The reason for marking immediately after creation is to prevent shared<br>
> > memory leaks in cases of aborted processes.    As a result of this difference<br>
> > I'm going to have to introduce a conditional compile ifdef for the MACOSX.<br>
> ><br>
> > Ideally I'd like to be able to detect that I'm about to compile on the MAC<br>
> > inside the Makefile (or at least in the install script).    Any ideas on how<br>
> > one could reliably detect a Linux OS as opposed to a Mac OS?<br>
> ><br>
> > Thanks in advance for your help.<br>
> ><br>
> > bob<br>
><br>
> Though it's not technically it's purpose; I've had good luck checking<br>
> /etc/issue for distro name and version info.<br>
<br>
</div>Unless you need the minor distro release number,<br>
how is that better than 'uname -a' and then parsing the output,<br>
specifically the first and third fields, especially if you<br>
want maximum Unix/Linux portability?<br>
<br>
Does anyone know what Mac OS returns from 'uname -a'?<br>
<div><div></div><div class="h5"><br>
--<br>
The Toronto Linux Users Group.      Meetings: <a href="http://gtalug.org/" target="_blank">http://gtalug.org/</a><br>
TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>
How to UNSUBSCRIBE: <a href="http://gtalug.org/wiki/Mailing_lists" target="_blank">http://gtalug.org/wiki/Mailing_lists</a><br>
</div></div></blockquote></div><br></div></div>