Boost logo

Boost :

Subject: [boost] What to do with platform defining 'null' as preprocessor symbol?
From: Jan Hudec (bulb_at_[hidden])
Date: 2012-08-17 17:37:43


Hello Folks,

At work we develop, among others, for Bada. The system library provided is
unfortunately somewhat flaky. A tell-tale sign is, that it's native API
headers define lowercase 'null' as preprocessor symbol expanding to 0.

Unfortunately boost uses identifier 'null'. So far we only hit the two cases
in boost/test/utils/basic_cstring/basic_cstring.hpp, where I fixed it by
renaming the symbols in our local copy of that header, but I noticed there
are many more instances in other modules.

Would it make sense to rename those identifiers and avoid that name like
boost avoids 'min' and 'max'? Or perhaps I could try simply undefining it in
config/platform somewhere and see whether Bada headers would break?
Unfortunately I don't think gcc has ability to redefine macros temporarily to
reinstate the original definition at the end of boost.

Generally speaking, Bada provides it's own native API, which is different
from anything else. It's object-oriented and looks nice at first sight, but
sometimes is inflexible in surprising places. It looks like they wrote
whatever they needed to implement applications that ship with the phones and
stopped there. The platform also provides ANSI C library and some parts of
POSIX, but many functions don't really work. Fortunately the platform is
going to be merged with Titzen, so it should at least get working POSIX
kernel (Linux) and standard libraries. That makes supporting this obscure
platform even less worth big trouble.

-- 
						 Jan 'Bulb' Hudec <bulb_at_[hidden]>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk