
16 Jul
2004
16 Jul
'04
8:58 a.m.
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