build problem: conflicting definitions of BOOL

eponymous alias <[email protected]>
Newsgroups gmane.comp.web.amaya.devel
Message-ID <[email protected]>
I'm trying to make Amaya available to the great masses using Solaris 10.

Ignoring for a moment various patches I've had to make (mostly involving the
selection of compilers and their options) that will eventually be reported
separately, the build gets here:

cd /tmp/amaya/Amaya/Solaris/thotlib
g++ -O2 -D_UNIX  -D_GL -D_WX  -DHAVE_CONFIG_H -I.. -I../../amaya/xpm
-I../../thotlib/include -I../../thotlib/internals/var
-I../../thotlib/internals/h -I../../thotlib/internals/f   
-I/tmp/amaya/wxWidgets/src/png -I/tmp/amaya/wxWidgets/src/jpeg
-I/tmp/amaya/wxWidgets/src/tiff
-I/tmp/amaya/Amaya/Solaris/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.6
-I/tmp/amaya/wxWidgets/include -I/tmp/amaya/wxWidgets/contrib/include
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES     
-I/usr/sfw/include/freetype2 -I/usr/sfw/include  -c
../../thotlib/base/AmayaApp.cpp -o base/AmayaApp.o

and this yields:

In file included from /usr/include/GL/glx.h:30,
                 from /tmp/amaya/wxWidgets/include/wx/gtk/glcanvas.h:24,
                 from /tmp/amaya/wxWidgets/include/wx/glcanvas.h:26,
                 from ../../thotlib/include/AmayaApp.h:12,
                 from ../../thotlib/base/AmayaApp.cpp:27:
/usr/include/X11/Xmd.h:159: error: conflicting declaration 'typedef CARD8 BOOL'
../../thotlib/include/thot_sys.h:221: error: 'BOOL' has a previous declaration
as `typedef ThotBool BOOL'
/usr/include/X11/Xmd.h:159: error: declaration of `typedef CARD8 BOOL'
../../thotlib/include/thot_sys.h:221: error: conflicts with previous
declaration `typedef ThotBool BOOL'
/usr/include/X11/Xmd.h:159: error: declaration of `typedef CARD8 BOOL'
../../thotlib/include/thot_sys.h:221: error: conflicts with previous
declaration `typedef ThotBool BOOL'

Clearly there is a conflict between these sources of Truth and Falsity (BOOL). 
I need advice from someone familiar with thotlib on how to cleanly (and
portably) rework the code in thot_sys.h so it doesn't conflict with Xmd.h but
still yields a workable compilation.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.