This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: struct stat


> Date: Sat, 13 Mar 1999 15:52:05 -0500
> From: "David A. Greene" <greened@eecs.umich.edu>
> Organization: Department of Electrical Engineering and Computer Science, The University of Michigan
> CC: greened@zip.eecs.umich.edu, aj@arthur.rhein-neckar.de,
>         libc-alpha@cygnus.com
> 
> Mark Kettenis wrote:
> > 
> >    Date: Sat, 13 Mar 1999 13:40:14 -0500
> >    From: "David A. Greene" <greened@eecs.umich.edu>
> > 
> > OK, let's get some things straight.  To use all features in glibc 2
> > and linux 2.2 you need a 64-bit integer type.  The types quad_t and
> > u_quad_t are abstractions for such a type (just like int64_t and
> > uint64_t).  Since dev_t is an unsigned  64-bit integer type in the
> > glibc ABI, it is defined in terms of u_quad_t.  
> 
> Why is dev_t a 64-bit integer type?

I think it became 64 bits when it was changed from 16 bits, which was
way too small.

It won't help anyway.  If anyone changed the stat structure in future,
ino_t and nlink_t would probably both change to 64 bits (I think the
new NFS wants 64-bit inode numbers).

> Not too likely in our case, I'm afraid.  Would it be too much to ask
> for the guard on quad_t/uquad_t to be changed from __GNUC__ to 
> __LONG_LONG_SUPPORTED__ or something?  Then at least other compilers
> have 
> a chance.  This seems like a fair compromise to me.

I suggest __LONG_LONG_NOT_SUPPORTED.  In the future, all standard C
compilers will support 'long long' (by definition, because the
standard will require it).  Certainly it shouldn't be conditioned on
__GNUC__, because there are many compilers that support it.


How hard would it be to add 'long long' to your research compiler?
Usually these things are very easy to do if you don't mind the
generated code being inefficient.

-- 
Geoffrey Keating <geoffk@ozemail.com.au>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]