help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make fstream.attach() transparent for big project migration


From: Ulrich Eckhardt
Subject: Re: Make fstream.attach() transparent for big project migration
Date: Sat, 10 Jun 2006 10:34:33 +0200
User-agent: KNode/0.10.2

Spectre wrote:
> I have a huge c/c++ project from 1992 

I.e. pre-standard C++, the C part is much more likely to work unmodified.

> that I have to migrate to GNU GCC 3.4.1. It wants the attach() function
> of fstream. 

The functions of std::fstream are defined by the C++ standard and it
doesn't have an attach() function.

> Is there a way I can get the project to see the functionality of having
> the attach() function? 

What does it do, attach a FILE* or a filedescriptor? What is its intended
use? Just as suggestion, take a look at the rdbuf() function of iostreams.
Other than that, I think GCC's standardlibrary includes
standard-extensions that ease interaction with above mentioned FILE* and
filedescriptor. 

Be prepared for having to do lots of porting though, quite a few things
changed before IOStreams were finally standardised.

> Does anyone happen to have the source for that function without 1992
> dependencies that I could drop into a helper function or something 
> like that. 

With what did you compile it up to now? You should look at the current
compiler's headers to see what this thing is, also, many
(pre-)standardlibraries come with documentation and at least partially
sourcecode.

Uli

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]