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

69 lines
1.7 KiB
Plaintext

$OpenBSD: patch-idl_codegen-c++-stub_cc,v 1.1 2004/09/26 12:11:00 espie Exp $
--- idl/codegen-c++-stub.cc.orig Sun Sep 2 20:23:05 2001
+++ idl/codegen-c++-stub.cc Sun Aug 15 19:34:55 2004
@@ -22,9 +22,9 @@
#include <CORBA.h>
-#include <fstream.h>
#include <ctype.h>
#include <stdio.h>
+#include <sstream>
#include "codegen-c++-stub.h"
#include <mico/template_impl.h>
#include <mico/util.h>
@@ -2773,7 +2773,7 @@ void CodeGenCPPStub::emit_Constant( CORB
string const_type;
{
- ostrstream ostr;
+ ostringstream ostr;
Output save;
o.save_streams (save);
o.start_output (ostr);
@@ -2784,14 +2784,12 @@ void CodeGenCPPStub::emit_Constant( CORB
o.stop_output ();
o.restore_streams (save);
- ostr << ends;
const_type = ostr.str();
- ostr.rdbuf()->freeze (0);
}
string const_init;
{
- ostrstream ostr;
+ ostringstream ostr;
Output save;
o.save_streams (save);
o.start_output (ostr);
@@ -2818,9 +2816,7 @@ void CodeGenCPPStub::emit_Constant( CORB
o.stop_output ();
o.restore_streams (save);
- ostr << ends;
const_init = ostr.str();
- ostr.rdbuf()->freeze (0);
}
CORBA::String_var const_name = c->name();
@@ -3223,7 +3219,7 @@ CodeGenCPPStub::emit_typecode_def (CORBA
#else
string init;
{
- ostrstream ostr;
+ ostringstream ostr;
Output save;
o.save_streams (save);
o.start_output (ostr);
@@ -3234,9 +3230,7 @@ CodeGenCPPStub::emit_typecode_def (CORBA
o.stop_output ();
o.restore_streams (save);
- ostr << ends;
init = ostr.str();
- ostr.rdbuf()->freeze (0);
}
emit_var_def ("CORBA::TypeCodeConst", scope, name, init);
#endif