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: Mon, 15 Mar 1999 10:16:09 -0500
   From: "David A. Greene" <greened@eecs.umich.edu>

   Umm...Wait a second.  dev_t is supposed to be an integral type.  It
   isn't
   if you're not using gcc.  This is broken.

Yep, because your compiler is broken, and it is impossible to fix the
problem in libc.

   > However, since I'm not the only glibc developer you'll have to
   > convince some of the others too.

   Ok, so what's the best way to do this?

Send a clean patch to the libc-alpha mailing list, that does not break
the existing support for gcc.  Explain the problem you are trying to
solve.  Add a ChangeLog entry.  You should probably read the GNU
coding standards before you do this.

   Yes, that's the ideal solution.  But what about all those people (most
   of
   them, actually), who don't want to go near the sources for their
   compiler?
   IMHO, there should be some way to define dev_t for those compilers that
   don't support long long

They should try to convince somebody else to do it, e.g. pay somebody
to do the job.

   True, but dev_t is one of those features.  It should work without
   relying on
   non-standard types.

On Linux, a 64-bit integer type is considered a standard type.  It has
been in the C compiler that 99.9% of the Linux users use.

   That's not quite true.  Guarding uquad_t with __GNUC__ precludes using
   any compiler but gcc.

Yep, that's intentional, since gcc is the only compiler available to
use that has a 64-bit integer type.

   > You wouldn't want to use a compiler that does not have a 64-bit integral
   > type anyway since they will become more and more important in the near
   > future."

   "In the future."  I need something that works now.  :)

Then use a compiler that supports 64-bit integer type, or use a C
library that does not consider a 64-bit type as a standard integer type.

   I see lots of "upcoming" and "future" adjectives.  What about the
   present?
   Even when these standards are finished, there should still be some
   support
   for bacward compatability.

Look ahead is one of the principles of a good design.  And we cannot
keep supporting old compilers forever.  As I said gcc has had long
long for a very long time now, and all major 32-bit Unix-like OSes
have a compiler that supports a 64-bit integer type now.


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