Patches item #1217414, was opened at 2005-06-09 02:27 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1217414...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update.
Category: puredata
Group: None Status: Open Resolution: None
Priority: 3
Submitted By: Hans-Christoph Steiner (eighthave) Assigned to: Miller Puckette (millerpuckette) Summary: change defines MACOSX to __APPLE__
Initial Comment:
gcc defines __APPLE__ automatically on Mac OS X so there is no need for the -DMACOSX, #ifdef MACOSX, etc This patch just changes every relevant instance of MACOSX to __APPLE__ and removes -DMACOSX in configure.in.
This does not change the functionality at all, but cleans up the code, using standard constructs, and makes things consistent with __linux__ and __FreeBSD__.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2005-12-02 13:23
Message: Logged In: YES user_id=27104
Rather than a patch, its much easier to just run this sed command:
sed -i.bak 's/MACOSX/__APPLE__/g' *.[ch]
This will only replace #ifdefs and comments, it won't affect any code. These leaves -DMACOSX in the makefile for legacy support.
On Windows, MSVC, Cygwin, and MinGW use WIN32 and the automatic platform define. But the sed replacement isn't as straightforward.
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2005-09-30 09:00
Message: Logged In: YES user_id=564396
assigned to miller.
its oh so bad, that w32 doesn't really have such an automatic define. (mingw does define __WIN32__; probably it would be good to add that one to the NT/MSW magic in m_pd.h)
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2005-06-09 14:10
Message: Logged In: YES user_id=27104
For Apple documentation on this topic, check out the "Predefined Macros" section of this webpage:
http://developer.apple.com/technotes/tn2002/tn2071.html
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1217414...
its oh so bad, that w32 doesn't really have such an automatic define. (mingw does define __WIN32__; probably it would be good to add that one to the NT/MSW magic in m_pd.h)
small addition: _WIN32 is defined with MSVC and MinGW gcc, but not with cygwin gcc(there's a __CYGWIN__ instead)
best greetings, Thomas
On Dec 2, 2005, at 2:14 PM, Thomas Grill wrote:
its oh so bad, that w32 doesn't really have such an automatic define. (mingw does define __WIN32__; probably it would be good to add that one to the NT/MSW magic in m_pd.h)
small addition: _WIN32 is defined with MSVC and MinGW gcc, but not with cygwin gcc(there's a __CYGWIN__ instead)
I've been using WIN32 which apparently both MSVC and MinGW define. MinGW apparently also defines __WIN32__, don't know about MSVC.
.hc ________________________________________________________________________ ____
"Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies."
- Amy Smith