|
Boost Users : |
From: Bobby Thomale (bthomale_at_[hidden])
Date: 2002-06-04 09:16:18
I am trying to use the boost libraries with a PowerPlant project on the
MacOS, and I ran into a small incompatibility between the headers. I am not
sure which codebase is at fault here.
The issue is with the __MACH__ symbol. In the Boost code where it is
checking for what platform I am using, it correctly identifies my platform
as MacOS. Then, in a file called MacOS.hpp, it uses the __MACH__ symbol to
determine if I am using the BSD standard C libraries or MSL. (I am using
MSL.)
It does this by checking for the EXISTANCE of the __MACH__ symbol, not
the value of it:
// If __MACH__, we're using the BSD standard C library, not the MSL:
#if defined(__MACH__)
However, in the PowerPlant header PP_Macros.h, the __MACH__ symbol is
defined and set to zero:
#ifndef __dest_os // For MSL
#ifndef __MACH__
#define __MACH__ 0
#endif
#if __MACH__
#include <ansi_prefix.mach.h>
#else
#define __dest_os __mac_os
#endif
#endif
I was able to work around the problem for now by making the Boost libraries
check for both the existance of __MACH__ and the value:
#if defined(__MACH__) && __MACH__
Seems to work.
However, I am curious. Which way is the right way? Is the __MACH__
symbol's existance or its value supposed to signal whether or not it is
"turned on"? The boost headers seem to think it is its existance, but the
PowerPlant headers seem to think it is its value.
I want to report the problem, but I am not sure whose code needs to change,
PowerPlant or Boost. Ideas?
-- Bobby
---------------------------------------------------------------------
Bobby Thomale
Senior Software Developer
Inoveon Corporation
http://www.inoveon.com/
---------------------------------------------------------------------
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net