Subject: pkg/24051: html2text won't compile with gcc-3.3
To: None <gnats-bugs@gnats.netbsd.org>
From: None <htodd@twofifty.com>
List: netbsd-bugs
Date: 01/10/2004 23:14:38
>Number:         24051
>Category:       pkg
>Synopsis:       html2text won't compile with gcc-3.3
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 11 08:15:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Hisashi T Fujinaka - htodd@twofifty.com
>Release:        NetBSD 1.6ZH
>Organization:
none at all
>Environment:
	
	
System: NetBSD allison 1.6ZH NetBSD 1.6ZH (ALLISON) #634: Sat Jan 10 13:42:18 PST 2004 htodd@allison:/disk/0/obj/sys/arch/i386/compile.i386/ALLISON i386
Architecture: i386
Machine: i386
>Description:
html2text will not compile with gcc-3.3
format.C: In member function `virtual Area* ListNormalItem::format(unsigned int, int, unsigned int, int*) const':
format.C:377: error: `ostrstream' undeclared (first use this function)
format.C:377: error: (Each undeclared identifier is reported only once for each function it appears in.)
format.C:377: error: parse error before `;' token
format.C:378: error: `oss' undeclared (first use this function)

	
>How-To-Repeat:
cd /usr/pkgsrc/textproc/html2text; make update
	
>Fix:
	
Here's the patch I used on a different system:

@@ -34,7 +34,7 @@
  /***************************************************************************/
 
 
-#include <strstream.h>
+#include <strstream>
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -374,7 +374,7 @@
   case CUSTOM3:   bullet = custom3_bullet; break;
   case ARABIC_NUMBERS:
     {
-      ostrstream oss;
+      std::ostrstream oss;
       oss << number << '.' << std::ends;
       bullet = oss.str();
       oss.rdbuf()->freeze(0);

>Release-Note:
>Audit-Trail:
>Unformatted: