[Test] 1.33 compile error for Win9x/ME targets

I'm trying to use the Boost Test framework for unit testing in asio but it doesn't work for Win9x/ME targets without a minor fix. The problem is due to boost/test/impl/execution_monitor.ipp only checking for _WIN32_WINNT, when the #define for Win9x/ME is _WIN32_WINDOWS. I had to make the following change to get it to work: @@ -55,7 +55,7 @@ # define BOOST_MS_STRUCTURED_EXCEPTION_HANDLING -# ifndef _WIN32_WINNT +# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) # ifdef _WINBASE_ # warning Debugger check disabled. Either define _WIN32_WINNT or include Boost.Test header in front of winbase.h # else I also encountered this as an error, rather than a warning as intended, because #warning is not supported by MSVC. It should probably use #pragma message("...") instead. Cheers, Chris

"Christopher Kohlhoff" <chris@kohlhoff.com> wrote in message news:20050921074552.7934.qmail@web32607.mail.mud.yahoo.com...
I'm trying to use the Boost Test framework for unit testing in asio but it doesn't work for Win9x/ME targets without a minor fix.
Win9x/ME does require some tuning. We never actually test on this platform I think.
The problem is due to boost/test/impl/execution_monitor.ipp only checking for _WIN32_WINNT, when the #define for Win9x/ME is _WIN32_WINDOWS. I had to make the following change to get it to work:
@@ -55,7 +55,7 @@
# define BOOST_MS_STRUCTURED_EXCEPTION_HANDLING
-# ifndef _WIN32_WINNT +# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) # ifdef _WINBASE_ # warning Debugger check disabled. Either define _WIN32_WINNT or include Boost.Test header in front of winbase.h # else
I also encountered this as an error, rather than a warning as intended, because #warning is not supported by MSVC. It should probably use #pragma message("...") instead.
Unfortunately I did not find a portable warning mechanism. So I chose to comply to one compiler that actually originated these statements (metrowerks)
Cheers, Chris
Gennadiy
participants (2)
-
Christopher Kohlhoff
-
Gennadiy Rozental