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

  • From: Andreas Färber <andreas.faerber@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 9 May 2008 14:04:28 +0200

Let me throw in that __BEOS__ is only one small detail and not the sole factor for source compatibility.


Most ports would be totally unaffected by its (non)existence since the BeOS/Haiku host is detected within ./configure and a custom constant defined, such as BEOS or G_OS_BEOS or USE_BEOS_BACKEND or whatever. This is the best practice way of doing it, since it allows cross- compilation, i.e. defining BEOS for code supposed to run on BeOS/Haiku but not necessarily compiled on BeOS/Haiku.

__BEOS__ would be mostly used for generic bits of code in absence of such package-specific defines. If dropped, defining it were possible at configure-level via CPPFLAGS or possibly at Makefile-level, or, as already mentioned I believe, as last resort, within the source file.

This is neither an argument for nor against __BEOS__, just a clarification of the impact.

Other related posts: