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 17:16:00 -0500
   From: Daniel Jacobowitz <drow@false.org>

   On Sat, Mar 13, 1999 at 09:09:08PM +0100, Mark Kettenis wrote:
   > Right now gcc is the only compiler that we now of that supports a 64-bit
   > integer type.  This implies that if you want to compare two dev_t's
   > you have to use gcc.

   As an at least interim solution, how about providing a macro to compare
   two dev_t values?  One that would work regardless of whether gcc was
   used, comparing the long longs if long longs are available and the
   structs otherwise?

I really don't think that supporting compilers that do not have a
64bit integral type is worth the trouble.  GCC has had long long for
ages.  Any modern compiler should have them, especially since they
will probably be in the next ISO C standard.  They are required by the
Unix98 specs quoted by someone to make clear that dev_t should be an
arithmetic type of an appropriate length, which can thus very well be
64 bits.

Anyway, adding the macro would encourage people to write nonportable
code.  Instead, people who try to use old compilers should either use
old libraries or try to work out the problems for themselves.

Mark


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