[haiku-development] Re: To __BEOS__ or not to __BEOS__?

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 06 May 2008 23:27:43 +0200

On 2008-05-06 at 23:00:32 [+0200], Andreas Färber <andreas.faerber@xxxxxx> 
wrote:
> Am 06.05.2008 um 22:19 schrieb Ingo Weinhold:
> 
> > from my experience with porting stuff to Haiku so far, I've come to
> > see the
> > fact that our gcc also defines __BEOS__ as quite a mixed blessing.
> > In a lot
> > of cases one has to (respectively it makes sense to) disable BeOS
> > work-arounds in software that had been ported to BeOS before. What
> > do you
> > think about dropping __BEOS__?
> 
> I probably favor this as well... Where is it being defined? Can we
> disable it ourselves under Haiku and run some tests first before you
> remove it in SVN?

It's defined in buildtools/legacy/gcc/gcc/config/i386/haiku.h. So you'd 
have to rebuild the compiler (which itself might use "#ifdef __BEOS__" in 
target platform code!). I don't know whether there is an easy way to just 
undefine the macro without rebuilding (maybe -include with a file 
containing an "#undef __BEOS__" works). Other than that you could use 
DiskProbe and replace the 3 instances in cpp, gcc, and g++ with "__BEOZ__" 
or something.

BTW, I wasn't thinking to remove __BEOS__ right now, anyway. If at all, I'd 
do that when starting my second run through the tool chain.

CU, Ingo

Other related posts: