Revision cc8edaf7e8e8eff2fc61804b5f00f0d32db7887d authored by Rene Brun on 01 July 2004, 20:02:52 UTC, committed by Rene Brun on 01 July 2004, 20:02:52 UTC
I attached the modifications that are needed in gcc3strm.cxx to compile with gcc 3.4.0.

There are 2 problems.

One is that I could not find any trace of
    ostream& operator<< (ostream&,const streampos&);
in the gcc 3.3.1 or the gcc 3.4.0 header files.
However it is in cint/lib/gcc3strm/iostrm.h and of course in gcc3strm.cxx

The second problem is more fundamental.  In gcc 3.4.0, streamoff is defined
as (include/c++/3.4.0/bits/postypes.h)
  #ifdef _GLIBCXX_HAVE_INT64_T
    typedef int64_t       streamoff;
  #else
    typedef long long     streamoff;
  #endif
in turn int64_t is platform dependent.  In particular, on my node int64_t
is typedef to an int.  In gcc 3.3.1, streamoff was a long.

This leads to the compilation error:

  cint/src/gcc3strm.cxx: In function `int G__G__stream_6_4_0(G__value*, const char*, G__param*, int)':
  cint/src/gcc3strm.cxx:149: error: 'const class std::fpos<mbstate_t>' has no member named 'operator long int'

As a quick fix, I simply replaced the implementatio of the wrapper so
that it does not do an explicit call to the operator long:
   const fpos<mbstate_t>*pos = (const fpos<mbstate_t>*)(G__getstructoffset());
   G__letint(result7,108,(long)(*pos));
instead of
   G__letint(result7,108,(long)((const fpos<mbstate_t>*)(G__getstructoffset()))->operator long());

Of course, this is fundamentally wrong, since on a 64 bit platform, this will truncate the long long
into a long.

I am not sure what would be good solution (theoritically, it would require to make sure that the
dictionary for fpos<mbstate_t> is different (long vs long long) on the appropriate platforms).


git-svn-id: http://root.cern.ch/svn/root/trunk@9367 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 023bf10
History
File Mode Size
RootShower
.cvsignore -rw-r--r-- 343 bytes
Aclock.cxx -rw-r--r-- 5.0 KB
Aclock.h -rw-r--r-- 4.0 KB
DrawTest.sh -rwxr-xr-x 259 bytes
Event.cxx -rw-r--r-- 14.3 KB
Event.h -rw-r--r-- 7.5 KB
EventLinkDef.h -rw-r--r-- 259 bytes
GetWebHistogram.C -rw-r--r-- 426 bytes
Hello.cxx -rw-r--r-- 3.3 KB
Hello.h -rw-r--r-- 1.5 KB
MainEvent.cxx -rw-r--r-- 10.1 KB
Makefile -rw-r--r-- 9.9 KB
Makefile.arch -rw-r--r-- 10.9 KB
Makefile.win32 -rw-r--r-- 6.0 KB
QpRandomDriver.cxx -rw-r--r-- 1.8 KB
README -rw-r--r-- 2.0 KB
TBench.cxx -rw-r--r-- 6.3 KB
TBench.h -rw-r--r-- 2.5 KB
TestVectors.cxx -rw-r--r-- 23.8 KB
Tetris.cxx -rw-r--r-- 27.1 KB
Tetris.h -rw-r--r-- 13.5 KB
bench.cxx -rw-r--r-- 15.3 KB
benchLinkDef.h -rw-r--r-- 288 bytes
ctorture.cxx -rw-r--r-- 6.7 KB
dt_DrawTest.C -rw-r--r-- 7.2 KB
dt_MakeFiles.sh -rwxr-xr-x 582 bytes
dt_MakeRef.C -rw-r--r-- 11.1 KB
dt_Makefile -rw-r--r-- 2.0 KB
dt_RunDrawTest.C -rw-r--r-- 5.4 KB
dt_RunDrawTest.sh -rwxr-xr-x 2.9 KB
dt_build.C -rw-r--r-- 68 bytes
dt_wrap.C -rw-r--r-- 226 bytes
eventa.cxx -rw-r--r-- 1.5 KB
eventb.cxx -rw-r--r-- 2.0 KB
eventload.cxx -rw-r--r-- 581 bytes
guitest.cxx -rw-r--r-- 73.8 KB
guiviewer.cxx -rw-r--r-- 10.3 KB
guiviewer.h -rw-r--r-- 800 bytes
guiviewerLinkDef.h -rw-r--r-- 149 bytes
hsimple.cxx -rw-r--r-- 2.1 KB
hworld.cxx -rw-r--r-- 1.2 KB
make_event_par.sh -rwxr-xr-x 809 bytes
minexam.cxx -rw-r--r-- 6.7 KB
stress.cxx -rw-r--r-- 56.1 KB
stressLinear.cxx -rw-r--r-- 129.7 KB
stressgeom.cxx -rw-r--r-- 13.0 KB
tcollbm.cxx -rw-r--r-- 10.1 KB
tcollex.cxx -rw-r--r-- 11.4 KB
test2html.cxx -rw-r--r-- 707 bytes
testbits.cxx -rw-r--r-- 5.5 KB
tstring.cxx -rw-r--r-- 3.4 KB
vlazy.cxx -rw-r--r-- 3.8 KB
vmatrix.cxx -rw-r--r-- 48.2 KB
vvector.cxx -rw-r--r-- 22.1 KB

README

back to top