[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MacOSX: ismac() implementation
From: |
Thomas Treichl |
Subject: |
Re: MacOSX: ismac() implementation |
Date: |
Sat, 06 Oct 2007 10:03:29 +0200 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
John W. Eaton schrieb:
On 5-Oct-2007, Thomas Treichl wrote:
| Hallo John,
|
| I was working on this implementation and I had the idea to check for the
| compiler macros that come with the XCode Mac developer tools (ie. the macro
| __APPLE__) and to further check if we are running a Darwin kernel (producing
| __MACH__ executables). Both #defines are set by gcc for Mac.
How reliable will this be if you use a different compiler?
I think I can't answer this question by sure, I can only say that __APPLE__ is
the replacement for __darwin__ since MacOSX and __MACH__ seems to be there for a
long time. These macros have been introduced by GNU and are also used on the
Apple Developer website for the one or other example. There seem to be other
proprietary compilers for Mac available but I don't know if they come with these
macros.
| If you say we better should use a test for this then the only check I could
| imagine is that we are again looking for a *darwin*
| canonical_host_type.
Config.guess uses information from uname:
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
but I suppose even that could change.
Hhhmmm... Don't know, but have a look what I've found
http://www.mathworks.com/matlabcentral/newsreader/view_thread/135204
| hope that the implementation that I send with this email is ok?
I'm still not sure what ismac() is useful for. Is it just for Matlab
compatibility? What is it used for in practice?
Yes, I would say just because of Matlab compatibility. The ismac on Matlab seems
to be very new and I think it was introduced in one of the latest releases. So I
thought we have enough time right now to implement it and have a look if
everybody is happy with it before the first codes appear and somebody says:' Hey
were is the ismac function?' The last reason is that it was my last open topic
on my TODO-list (right now on the Mac side where I can help - everything else
has been fixed and seems to be ready for a stable release of Octave on Mac ;)
| Should Changelog descriptions normally also be part of a patch?
No, they rarely apply correctly because there are almost always some
other changes to those files that cause the context to fail to match.
It would be helpful to prefix each set of entries with the file as I do
when I post patches to the list. (ChangeLog: src/ChangeLog:, etc.)
./Changelog
2007-10-05 Thomas Treichl <address@hidden>
* configure.in: Added '#define MACOS' for Apple Mac OS.
./src/Changelog
2007-10-05 Thomas Treichl <address@hidden>
* toplev.cc: Added field for Mac OS in DEFUN octave_config_info.
./scripts/Changelog
2007-10-05 Thomas Treichl <address@hidden>
* miscellaneous/Makefile.in: Added ismac.m.
* miscellaneous/ismac.m: New function.
* miscellaneous/ispc.m: Added @seealso{ismac, isunix} in help text.
* miscellaneous/isunix.m: Added @seealso{ismac, ispc} in help text.
These file names should have the subdirectory as well
(miscellaneous/Makefile:, miscellaneous/ismac.m, etc.).
jwe
Yes ok, thanks.
Thomas