From a38ccfdc79ca8571e4dcbe4302fb3010f1180341 Mon Sep 17 00:00:00 2001 From: Jonathan Turkanis Date: Sat, 5 Feb 2005 22:26:55 +0000 Subject: [PATCH] fix for old Dinkumware [SVN r27156] --- include/boost/iostreams/filter/bzip2.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/iostreams/filter/bzip2.hpp b/include/boost/iostreams/filter/bzip2.hpp index 959f57e..1fc9991 100755 --- a/include/boost/iostreams/filter/bzip2.hpp +++ b/include/boost/iostreams/filter/bzip2.hpp @@ -15,7 +15,7 @@ #include // allocator. #include // failure. #include // bad_alloc. -#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME. +#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM. #include #include // buffer size. #include @@ -275,7 +275,12 @@ void* bzip2_allocator::alloc(void* self, int items, int size) { size_type len = items * size; char* ptr = - static_cast(self)->allocate(len + sizeof(size_type)); + static_cast(self)->allocate + (len + sizeof(size_type) + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + , (char*)0 + #endif + ); *reinterpret_cast(ptr) = len; return ptr + sizeof(size_type); }