octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOSX: ismac() implementation


From: Søren Hauberg
Subject: Re: MacOSX: ismac() implementation
Date: Sun, 02 Sep 2007 13:34:53 +0200
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

Thomas Treichl skrev:
Sorry for answering my own email but I once again thought about ismac() and I think that this thread isn't worth being discussed because the solution is found on the Mac site where it says 'Based on Unix':

  http://www.apple.com/macosx/features/unix/

So I would say that isunix() should return true on Mac and also ismac() should return true.
Yeah, I thought about that as well. But I'm not sure if 'isunix' should be taken to literally. I mean, GNU/Linux isn't unix, but I don't think that 'isunix' should return false for GNU/Linux. I'm guessing the 'is[unix|pc|mac]' functions would most often be used like this:

if (ispc())
  # windows code here
elseif (isunix())
  # BSD/Linux/Solaris/AIX/etc code here
elseif (ismac())
  # OS X code here
else
  error("Unknown OS")
endif

But since I only use GNU/Linux I'm only guessing here. I never really think about writing cross-platform code...

Søren


reply via email to

[Prev in Thread] Current Thread [Next in Thread]