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
TProcessID.h
// @(#)root/cont:$Name: $:$Id: TProcessID.h,v 1.8 2002/12/18 08:07:29 brun Exp $
// Author: Rene Brun 28/09/2001
/*************************************************************************
* 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_TProcessID
#define ROOT_TProcessID
//////////////////////////////////////////////////////////////////////////
// //
// TProcessID //
// //
// Process Identifier object //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
class TFile;
class TProcessID : public TNamed {
protected:
Int_t fCount; //!Reference count to this object (from TFile)
TObjArray *fObjects; //!Array pointing to the referenced objects
static TProcessID *fgPID; //Pointer to current session ProcessID
static TObjArray *fgPIDs; //Table of ProcessIDs
static UInt_t fgNumber; //Referenced objects count
public:
TProcessID();
TProcessID(const TProcessID &ref);
virtual ~TProcessID();
virtual void Clear(Option_t *option="");
Int_t DecrementCount();
Int_t IncrementCount();
Int_t GetCount() const {return fCount;}
TObjArray *GetObjects() const {return fObjects;}
TObject *GetObjectWithID(UInt_t uid);
void PutObjectWithID(TObject *obj, UInt_t uid=0);
virtual void RecursiveRemove(TObject *obj);
static TProcessID *AddProcessID();
static UInt_t AssignID(TObject *obj);
static void Cleanup();
static TProcessID *ReadProcessID(UShort_t pidf , TFile *file);
static UShort_t WriteProcessID(TProcessID *pid , TFile *file);
static TProcessID *GetProcessID(UShort_t pid);
static TProcessID *GetProcessWithUID(UInt_t uid);
static TProcessID *GetSessionProcessID();
static UInt_t GetObjectCount();
static Bool_t IsValid(TProcessID *pid);
static void SetObjectCount(UInt_t number);
ClassDef(TProcessID,1) //Process Unique Identifier in time and space
};
#endif
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...