Subject: Re: patches for koffice for gcc 3.3.1
To: Jeremy C. Reed <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 09/29/2003 22:29:04
On Mon, Sep 29, 2003 at 02:27:14PM -0700, Jeremy C. Reed wrote:
> I needed some patches to build koffice with gcc 3.3.1. (I am using
> gcc3-c++-3.3.1 from pkgsrc.)
> Examples of errors:
> strstream.h: No such file or directory
> In member function `void QpFormula::floatFuncReal(const char*)':
> error: `ostrstream' undeclared (first use this function)
> and
> In member function `void
> Table::generateTopLineBorder(QTextStream&,    int)':
> error: ISO C++ forbids variable-size array `border'
> I assume these patches are fine for older gcc too. Can someone
> test and confirm?
> If these are fine, may I add them?

I don't have any problem with adding these now as a workaround, but
<strstream> is most definitely a non-standard C++ header (it may not
be provided by either the MIPSPro os SunPro compilers, but I can't
really say), so we'll need to revisit this again in the future when
GCC removes this header from their distribution.  The right header to
use is <sstream>, but it provides a completely different "string
stream" class and it's not provided by older GCCs, e.g. 2.95.x.  I
think the right way to do this is to use some #ifdef magic to use
<sstream> if it exists and to use <strstream> as a fallback to help
older GCCs.


	-- Johnny Lam <>