Coda File System

RVM not compilable with iostream?

From: Anthony Nicholson <>
Date: Sat, 9 Nov 2002 12:08:03 -0500 (EST)
I've modified Venus by adding a bunch of new code... some of this code 
includes iostream.h to make use of the stream input/output functions. It 
compiles fine on it's own but...

.. when I compile it together with the venus source, I get the following 
compilation error:

c++ -fno-exceptions -fno-operator-names -MD -DHAVE_CONFIG_H -I. 
-I/home/test/coda/coda-5.3.19/include -I/home/test/coda/coda-5.3.19 -g -O2 
In file included from /usr/include/g++-3/stl_algobase.h:53,
                 from /usr/include/g++-3/list:30,
                 from azy.h:12,
                 from algorithm.h:24,
                 from prefetcher.h:26,
                 from fso.h:84,
                 from adv_monitor.h:24,
/usr/include/g++-3/iostream.h:40: `ostream &flush (ostream &)' 
redeclared as different kind of symbol
/usr/local/include/rvm/rvm.h:84: previous declaration of `rvm_mode_t 
/usr/local/include/rvm/rvm.h:84: previous non-function declaration 
`rvm_mode_t flush'
/usr/include/g++-3/iostream.h:40: conflicts with function declaration 
`ostream &flush (ostream &)'
make: *** [adv_monitor.o] Error 1

As you can maybe tell from the above trace, I have created two new 
classes: "prefetcher" and "algorithm". I made an instance of class 
prefetcher a member of the fsdb class... which is why you see that 
included in fso.h. class algorithm is similarly used by prefetcher. 

It is inside class algorithm that iostream.h is included. It appears that 
the following declaration in iostream.h:

extern ostream& flush(ostream& outs);

is conflicting with this enum in rvm.h:

/*  Transaction mode codes: rvm_mode_t */
typedef enum
    rvm_first_mode = 139,               /* internal use only */
    restore,                            /* restore memory on abort */
    no_restore,                         /* do not restore memory on abort */
    flush,                              /* flush records to logdev on commit */
    no_flush,                           /* do not flush records on commit */
    rvm_last_mode                       /* internal use only */

specifically, the "flush" member.

Any suggestions? Or can I just not use the iostream package inside of 


Received on 2002-11-09 12:12:28