Re: [ROOT] Fw: GCC 2.96

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Oct 06 2000 - 16:24:15 MEST


Hi Dan,

   I know now (thanks to glibc 2.2), but of all the platforms I've been
compiling this code on (about 14 different architectures) this is the
first time it failed. Proving the point that to get robust code
you have to port it to many different platforms.

The main gripe on RH7.0 is the compiler.


Cheers, Fons.


Dan Pop wrote:
> 
> On Fri, 6 Oct 2000, Fons Rademakers wrote:
> 
> > same in glibc 2.2 this is not such a big issue as the bad compiler. One of the
> > incompatibilities I ran into was that the type fpos_t used by fgetpos(),
> > fsetpos()
> > is now a struct and not anymore an long, so code like:
> >    fpos_t oldpos, pos;
> >    ...
> >    if (oldpos == pos)
> >       ...
> > fails to compile.
> 
> This code was broken in the first place.  fpos_t has *never* been
> guaranteed to be a scalar type.  fpos_t, fgetpos and fsetpos have been
> introduced into the language to provide support for files too large to
> be handled with long offsets.
> 
> If a long offset is enough for your purposes (i.e. your files are
> never larger than 2 GB), you can use ftell() and fseek() whose offset
> is a long *by definition*.
> 
> Dan

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:34 MET