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
Raw File
TAttPad.h
// @(#)root/base:$Name:  $:$Id: TAttPad.h,v 1.4 2000/12/13 15:13:45 brun Exp $
// Author: Rene Brun   04/01/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TAttPad
#define ROOT_TAttPad


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TAttPad                                                              //
//                                                                      //
// Pad attributes.                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_Gtypes
#include "Gtypes.h"
#endif

#ifndef ROOT_Htypes
#include "Htypes.h"
#endif


class TAttPad {
protected:
        Float_t     fLeftMargin;      //LeftMargin
        Float_t     fRightMargin;     //RightMargin
        Float_t     fBottomMargin;    //BottomMargin
        Float_t     fTopMargin;       //TopMargin
        Float_t     fXfile;           //X position where to draw the file name
        Float_t     fYfile;           //X position where to draw the file name
        Float_t     fAfile;           //Alignment for the file name
        Float_t     fXstat;           //X position where to draw the statistics
        Float_t     fYstat;           //X position where to draw the statistics
        Float_t     fAstat;           //Alignment for the statistics
        Color_t     fFrameFillColor;  //pad frame fill color
        Color_t     fFrameLineColor;  //pad frame line color
        Style_t     fFrameFillStyle;  //pad frame fill style
        Style_t     fFrameLineStyle;  //pad frame line style
        Width_t     fFrameLineWidth;  //pad frame line width
        Width_t     fFrameBorderSize; //pad frame border size
        Int_t       fFrameBorderMode; //pad frame border mode

public:
        TAttPad();
        virtual ~TAttPad();
        virtual void     Copy(TAttPad &attpad) const;
        Float_t          GetBottomMargin() const { return fBottomMargin;}
        Float_t          GetLeftMargin() const { return fLeftMargin;}
        Float_t          GetRightMargin() const { return fRightMargin;}
        Float_t          GetTopMargin() const { return fTopMargin;}
        Float_t          GetAfile() const { return fAfile;}
        Float_t          GetXfile() const { return fXfile;}
        Float_t          GetYfile() const { return fYfile;}
        Float_t          GetAstat() const { return fAstat;}
        Float_t          GetXstat() const { return fXstat;}
        Float_t          GetYstat() const { return fYstat;}
        Color_t          GetFrameFillColor() const {return fFrameFillColor;}
        Color_t          GetFrameLineColor() const {return fFrameLineColor;}
        Style_t          GetFrameFillStyle() const {return fFrameFillStyle;}
        Style_t          GetFrameLineStyle() const {return fFrameLineStyle;}
        Width_t          GetFrameLineWidth() const {return fFrameLineWidth;}
        Width_t          GetFrameBorderSize() const {return fFrameBorderSize;}
        Int_t            GetFrameBorderMode() const {return fFrameBorderMode;}
        virtual void     Print(Option_t *option="") const;
        virtual void     ResetAttPad(Option_t *option="");
        virtual void     SetBottomMargin(Float_t bottommargin);
        virtual void     SetLeftMargin(Float_t leftmargin);
        virtual void     SetRightMargin(Float_t rightmargin);
        virtual void     SetTopMargin(Float_t topmargin);
        virtual void     SetAfile(Float_t afile) { fAfile=afile;}
        virtual void     SetXfile(Float_t xfile) { fXfile=xfile;}
        virtual void     SetYfile(Float_t yfile) { fYfile=yfile;}
        virtual void     SetAstat(Float_t astat) { fAstat=astat;}
        virtual void     SetXstat(Float_t xstat) { fXstat=xstat;}
        virtual void     SetYstat(Float_t ystat) { fYstat=ystat;}
        void             SetFrameFillColor(Color_t color=1) {fFrameFillColor = color;}
        void             SetFrameLineColor(Color_t color=1) {fFrameLineColor = color;}
        void             SetFrameFillStyle(Style_t styl=0)  {fFrameFillStyle = styl;}
        void             SetFrameLineStyle(Style_t styl=0)  {fFrameLineStyle = styl;}
        void             SetFrameLineWidth(Width_t width=1) {fFrameLineWidth = width;}
        void             SetFrameBorderSize(Width_t size=1) {fFrameBorderSize = size;}
        void             SetFrameBorderMode(Int_t mode=1) {fFrameBorderMode = mode;}

        ClassDef(TAttPad,3)  //Pad attributes
};

#endif

back to top