# # # patch "ChangeLog" # from [eaa4693f757c25db80e183a75e2b3afec0cab22a] # to [d2febad1d8293bccf16942b39578a89630ff94c8] # # patch "cmd_automate.cc" # from [cf5023075c21c358634a3dfff54010bc9f30b83e] # to [2005c15b524feb4b3fac000cb6f8ce65930252b0] # # patch "netxx_pipe.cc" # from [8e75c59d30d1922022dce7a3edf464f8942c2a81] # to [3525984e64f6ee51d1adc5f242701097a004e0f7] # # patch "visualc/monotone.vcproj" # from [76769b566ffcada12e02a207c0f45e8aaf213cc0] # to [2777d9b3a8d203bfced1da42d866b40d8caeb7f7] # # patch "visualc/sqlite3.vcproj" # from [a9a3fdc284b3406b7b0708ee9db4565cf4bfba67] # to [df61b0c7240b2a0c8e0134fd49facc6e94a359cb] # ============================================================ --- ChangeLog eaa4693f757c25db80e183a75e2b3afec0cab22a +++ ChangeLog d2febad1d8293bccf16942b39578a89630ff94c8 @@ -1,5 +1,11 @@ 2006-07-04 Graydon Hoare + * cmd_automate.cc: Fix for VC8 compatibility. + * netxx_pipe.cc: Minor cleanups. + * visualc/*.vcproj: Build fixes. + +2006-07-04 Graydon Hoare + * randomizer.{cc,hh}: Remove seed function. * randomfile.hh: Remove use of seed(). * diff_patch.cc: Remove seeding arg from tester. ============================================================ --- cmd_automate.cc cf5023075c21c358634a3dfff54010bc9f30b83e +++ cmd_automate.cc 2005c15b524feb4b3fac000cb6f8ce65930252b0 @@ -263,7 +263,12 @@ boost::ref(output), boost::ref(outpos), _1)); - s.std::basic_ios >::rdbuf(&sb); + { + // Do not use s.std::basic_ios<...>::rdbuf here, + // it confuses VC8. + using std::basic_ios; + s.basic_ios >::rdbuf(&sb); + } try { err=0; ============================================================ --- netxx_pipe.cc 8e75c59d30d1922022dce7a3edf464f8942c2a81 +++ netxx_pipe.cc 3525984e64f6ee51d1adc5f242701097a004e0f7 @@ -474,36 +474,40 @@ void Netxx::PipeCompatibleProbe::add(PipeStream &ps, ready_type rt) - { - assert(!is_pipe); - assert(!pipe); - is_pipe = true; - pipe = &ps; - ready_t = rt; - } +{ + assert(!is_pipe); + assert(!pipe); + is_pipe = true; + pipe = &ps; + ready_t = rt; +} void -Netxx::PipeCompatibleProbe::add(const StreamBase &sb, ready_type rt) - { - // FIXME: This is an unfortunate way of performing a downcast. - // Perhaps we should twiddle the caller-visible API. - try - { - add(const_cast(dynamic_cast(sb)),rt); - } - catch (...) - { - assert(!is_pipe); - Probe::add(sb,rt); - } - } +Netxx::PipeCompatibleProbe::add(StreamBase const &sb, ready_type rt) +{ + // FIXME: This is *still* an unfortunate way of performing a + // downcast, though slightly less awful than the old way, which + // involved throwing an exception. + // + // Perhaps we should twiddle the caller-visible API. + + StreamBase const *sbp = &sb; + PipeStream const *psp = dynamic_cast(sbp); + if (psp) + add(const_cast(*psp),rt); + else + { + assert(!is_pipe); + Probe::add(sb,rt); + } +} void Netxx::PipeCompatibleProbe::add(const StreamServer &ss, ready_type rt) - { - assert(!is_pipe); - Probe::add(ss,rt); - } +{ + assert(!is_pipe); + Probe::add(ss,rt); +} #else // unix void Netxx::PipeCompatibleProbe::add(PipeStream &ps, ready_type rt) @@ -516,22 +520,22 @@ void Netxx::PipeCompatibleProbe::add(const StreamBase &sb, ready_type rt) - { - try - { - add(const_cast(dynamic_cast(sb)),rt); - } - catch (...) - { - Probe::add(sb,rt); - } - } +{ + try + { + add(const_cast(dynamic_cast(sb)),rt); + } + catch (...) + { + Probe::add(sb,rt); + } +} void Netxx::PipeCompatibleProbe::add(const StreamServer &ss, ready_type rt) - { - Probe::add(ss,rt); - } +{ + Probe::add(ss,rt); +} #endif #ifdef BUILD_UNIT_TESTS ============================================================ --- visualc/monotone.vcproj 76769b566ffcada12e02a207c0f45e8aaf213cc0 +++ visualc/monotone.vcproj 2777d9b3a8d203bfced1da42d866b40d8caeb7f7 @@ -324,6 +324,10 @@ > + + - - @@ -487,6 +487,10 @@ > + + @@ -784,6 +788,10 @@ > + + ============================================================ --- visualc/sqlite3.vcproj a9a3fdc284b3406b7b0708ee9db4565cf4bfba67 +++ visualc/sqlite3.vcproj df61b0c7240b2a0c8e0134fd49facc6e94a359cb @@ -110,7 +110,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" WholeProgramOptimization="false" - AdditionalIncludeDirectories=""C:\Program Files\Microsoft Platform SDK\Include"" + AdditionalIncludeDirectories=""C:\Program Files\Microsoft Platform SDK\Include";"$(ProjectDir)\..\visualc"" PreprocessorDefinitions="WIN32;NDEBUG;_MBCS;_CONSOLE;SQLITE_OMIT_CURSOR" StringPooling="true" EnableFunctionLevelLinking="false"