|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-16 03:58:20
Hello,
in my library I use _WIN32 macro to detect the case when I'm on windows (e.g.
to get the right header for 'environ'). However, Boost.Config has more
complex logic:
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// win32:
....
Does it mean I have to use the same conditional? Which compilers define
__WIN32__ or WIN32, but don't define _WIN32? Shouldn't there be a single
BOOST_WINDOWS macros to help in this cases?
FWIW, filesystem defines such macro internally:
# if !defined( BOOST_WINDOWS ) && !defined( BOOST_POSIX )
# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|| defined(__CYGWIN__)
# define BOOST_WINDOWS
# else
# define BOOST_POSIX
# endif
# endif
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk