
On Monday 04 April 2005 17:51, Stefan Slapeta wrote:
Gennadiy Rozental wrote:
Does anybody know a reliable way to workaround this? Why _WIN32_WINNT isn't defined by default? Could we define it in Jamfiles or Boost.Build sources?
The problem is that if you define it, the code will not execute on Win95 (at least for _WIN32_WINNT=4; higher values have more restrictions, of course). I don't know if there's really a huge problem with this.
Using that inside a library would make the lib unusable on win95 though. Much better is the approach taken for (IIRC) TryLockMutex in the threads library: try to retrieve a function pointer at runtime via GetProcAddress(). Also an idea: namespace boost{ // wrapper around platform specific means to detect and activate a debugger namespace debugger { // detect presence bool present(); // create a break to enter the debugger void enter(); } } /** special versions as macros that enter the debugger at the point of use and not inside debugger::enter(), if available. Purely for debugging convenience. */ #if __x86 // enter debugger via int13 # define BOOST_DEBUG_BREAK int13() #else // default # define BOOST_DEBUG_BREAK ::boost::debugger::enter() #endif Uli