qt4-mac-4.5 breaks building of texmacs. I tracked this down to the file <QtGui/qmacdefines_mac.h> in /sw/lib/qt4-mac/include/, which did not exist in qt4-mac-4.4.
That file does some preprocessor macro tricks with the DEBUG symbol (see below) that a) don't look useful and b) look wrong, like if the author did not understand how preprocessor macros work, which is weird, considering that the whole file consist basically of #defines. Here is what happens: If you #define DEBUG as whatever value you want, then #include <QtGui/qmacdefines_mac.h> or indirectly via <Qt/qwindowdefs.h>, then you will find that the symbol DEBUG's value has changed into a literal "OLD_DEBUG". This breaks any program that uses DEBUG as a preprocessor macro and the qt4-mac GUI. My question is first, whether anyone has seen this bug mentioned (I didn't find it on google), and second, how to best fix or work around it. The macros in question come in 2 blocks, with some other code in between. They only make sense if the code in between wants DEBUG=0, but I have not seen why this should be the case, hence a) above. The macros are: #undef OLD_DEBUG #ifdef DEBUG # define OLD_DEBUG DEBUG # undef DEBUG #endif #define DEBUG 0 ... #undef DEBUG #ifdef OLD_DEBUG # define DEBUG OLD_DEBUG # undef OLD_DEBUG #endif The idea is clear, but preprocessor macros don't work like that. The result is always DEBUG="OLD_DEBUG", because at the time when DEBUG is evaluated after the above, OLD_DEBUG is undef'ed. -- Martin ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel