# # old_revision [1ba359499368e5e96fa8846981ab51b7435f4335] # # patch "botan/mem_pool.cpp" # from [48fe6a0021988c2c9a858db08e12f99909f13958] # to [8050abebfa25644c457fd81b4eddf791b86f5c25] # # patch "botan/mem_pool.h" # from [717eee90347c21cb7be5f4e7c281fab7cfb77be0] # to [e770dc2fe471f3a44c1096480ddb5e9875d50c2f] # # patch "paths.cc" # from [7ea2a9bf9ffc447d809cc4b409b918b2f73bf3cc] # to [9be0b0ca30c8a3bb03e47ee4bf021f807bf2edef] # # patch "visualc/monotone.vcproj" # from [46625dd0da7e31521214ab9181f0f997a772715c] # to [f338679f8c5eac74180b9be211a939713436941d] # # patch "visualc/tester.vcproj" # from [a1c5b6da0b35640af64c32366ff7a87fad775e9d] # to [24743caab32ef424f39158a2470a559828e6baf0] # ============================================================ --- botan/mem_pool.cpp 48fe6a0021988c2c9a858db08e12f99909f13958 +++ botan/mem_pool.cpp 8050abebfa25644c457fd81b4eddf791b86f5c25 @@ -59,6 +59,13 @@ inline bool Pooling_Allocator::Memory_Bl return (buffer < other); } +inline bool Pooling_Allocator::Memory_Block::operator>(const void* other) const + { + if(buffer <= other && other < buffer_end) + return false; + return (buffer > other); + } + /************************************************* * See if ptr is contained by this block * *************************************************/ ============================================================ --- botan/mem_pool.h 717eee90347c21cb7be5f4e7c281fab7cfb77be0 +++ botan/mem_pool.h e770dc2fe471f3a44c1096480ddb5e9875d50c2f @@ -47,8 +47,11 @@ class Pooling_Allocator : public Allocat void free(void*, u32bit) throw(); bool operator<(const void*) const; + bool operator>(const void*) const; bool operator<(const Memory_Block& other) const { return (buffer < other.buffer); } + bool operator>(const Memory_Block& other) const + { return (buffer > other.buffer); } private: typedef u64bit bitmap_type; static const u32bit BITMAP_SIZE = 8 * sizeof(bitmap_type); @@ -62,7 +65,7 @@ struct diff_less : public std::binary_fu { bool operator()(const _first& __x, const _second& __y) const { return __x < __y; } #if defined(_MSC_VER) && defined(_DEBUG) - bool operator()(const _second& __y, const _first& __x) const { return __x < __y; } + bool operator()(const _second& __y, const _first& __x) const { return __x > __y; } bool operator()(const _first& __x, const _first& __y) const { return __x < __y; } #endif }; ============================================================ --- paths.cc 7ea2a9bf9ffc447d809cc4b409b918b2f73bf3cc +++ paths.cc 9be0b0ca30c8a3bb03e47ee4bf021f807bf2edef @@ -502,7 +502,7 @@ any_path::basename() const string const & s = data; string::size_type sep = s.rfind('/'); #ifdef WIN32 - if (sep == string::npos && s[1] == ':') + if (sep == string::npos && s.size()>= 2 && s[1] == ':') sep = 1; #endif if (sep == string::npos) @@ -520,7 +520,7 @@ any_path::dirname() const string const & s = data; string::size_type sep = s.rfind('/'); #ifdef WIN32 - if (sep == string::npos && s[1] == ':') + if (sep == string::npos && s.size()>= 2 && s[1] == ':') sep = 1; #endif if (sep == string::npos) @@ -559,7 +559,7 @@ system_path::dirname() const string const & s = data; string::size_type sep = s.rfind('/'); #ifdef WIN32 - if (sep == string::npos && s[1] == ':') + if (sep == string::npos && s.size()>= 2 && s[1] == ':') sep = 1; #endif I(sep != string::npos); @@ -1580,7 +1580,7 @@ UNIT_TEST(paths, system) #ifdef WIN32 UNIT_TEST_CHECK(system_path("~this_user_does_not_exist_anywhere") .as_external() - == "~this_user_does_not_exist_anywhere"); + == "/a/b/~this_user_does_not_exist_anywhere"); #else UNIT_TEST_CHECK_THROW(system_path("~this_user_does_not_exist_anywhere"), informative_failure); ============================================================ --- visualc/monotone.vcproj 46625dd0da7e31521214ab9181f0f997a772715c +++ visualc/monotone.vcproj f338679f8c5eac74180b9be211a939713436941d ============================================================ --- visualc/tester.vcproj a1c5b6da0b35640af64c32366ff7a87fad775e9d +++ visualc/tester.vcproj 24743caab32ef424f39158a2470a559828e6baf0