> On Fri, 22 Aug 2003, Lasse Danielsen wrote:
>> Hello again. Sorry for the late reply - I had made squirrelmail unavailible
>> for my users after I sent my post (they have an alternative webmail). I was
>> thinking I could reproduce the error myself, but that failed. So I gave my
>> users access again and had to wait for it to "hang" again...
> 
> Here's my first attempt at fixing the problem. It seems that when I
> removed the subclassing of ostream and made BincStream a standalone that
> this causes the template <<-operator to spin recursively. Although I am
> not sure if this is the right fix, it does no harm so I'd like you to try
> it.
> 
> Two patches. Here's #1 (12 lines):
> 
> diff -u -r1.1.1.1 convert.h
> --- src/convert.h       18 Aug 2003 18:06:05 -0000      1.1.1.1
> +++ src/convert.h       22 Aug 2003 16:29:23 -0000
> @@ -277,7 +277,7 @@
>  }
> 
> 
> //------------------------------------------------------------------------
> -  class BincStream {
> +  class BincStream : public std::ostream {
> #ifdef HAVE_SSTREAM
>    std::stringstream nstr;
> 
> Here's patch #2 (17 lines):
> 
> diff -u -r1.1.1.1 convert.cc
> --- src/convert.cc      18 Aug 2003 18:06:05 -0000      1.1.1.1
> +++ src/convert.cc      22 Aug 2003 16:29:23 -0000
> @@ -57,7 +57,11 @@
> using namespace Binc;
> 
> 
> //------------------------------------------------------------------------
> -BincStream::BincStream(void)
> +class dummybuf : public std::streambuf {
> +};
> +
> +//------------------------------------------------------------------------
> +BincStream::BincStream(void) : std::ostream(new dummybuf())
> {
>  terminated = false;
> }

These work on OS X (although I noticed no problem before).

-B...

Reply via email to