openbsd-ports/devel/mico/patches/patch-idl_codegen-idl_cc
espie 379f54390a make it build with gcc3.
Mostly work from Aleksander Piotrowski
2004-09-26 12:11:00 +00:00

33 lines
790 B
Plaintext

$OpenBSD: patch-idl_codegen-idl_cc,v 1.1 2004/09/26 12:11:00 espie Exp $
--- idl/codegen-idl.cc.orig Sun Sep 2 20:23:05 2001
+++ idl/codegen-idl.cc Sun Aug 15 19:35:36 2004
@@ -21,7 +21,8 @@
*/
#include <CORBA.h>
-#include <fstream.h>
+#include <fstream>
+#include <sstream>
#include <ctype.h>
#include <stdio.h>
#ifdef USE_CCM
@@ -71,7 +72,7 @@ void CodeGenIDL::emit( string &fnbase )
string CodeGenIDL::emit( CORBA::IRObject_ptr obj )
{
- ostrstream idl;
+ ostringstream idl;
CORBA::Contained_var contained = CORBA::Contained::_narrow( obj );
if( !CORBA::is_nil( contained ) ) {
@@ -84,9 +85,7 @@ string CodeGenIDL::emit( CORBA::IRObject
o.stop_output();
}
- idl << ends;
string result = idl.str();
- idl.rdbuf()->freeze( 0 );
return result;
}