bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re4: coreutils v5.2.1 - stat.c


From: ThMO
Subject: Re4: coreutils v5.2.1 - stat.c
Date: Thu, 29 Sep 2005 20:05:34 +0200

Hello Paul,

> > the header file xtime.h defines:
> >   # if HAVE_LONG_LONG
> >   typedef long long int xtime_t;
> >   #  define XTIME_PRECISION 1000000000LL
> >   # else
> >   ...
> >   #endif
> > Again cpp groks about the `LL' modifier.
> 
> Thanks for catching that portability problem to GCC 2.7.2.1.  Please
> try the following patch, which I have installed into coreutils and
> gnulib CVS.  I have manually verified that no other code cares whether
> XTIME_PRECISION is of type int or long long int.

I do have a shorter patch for you:

--- coreutils-5.3.1-cvs/lib/xtime.h.orig        2005-05-14 10:03:44.000000000 
+0200
+++ coreutils-5.3.1-cvs/lib/xtime.h     2005-09-29 19:51:50.000000000 +0200
@@ -27,7 +27,7 @@
    seconds.  */
 # if HAVE_LONG_LONG
 typedef long long int xtime_t;
-#  define XTIME_PRECISION 1000000000LL
+#  define XTIME_PRECISION 1000000000L
 # else
 #  include <limits.h>
 typedef long int xtime_t;

This older cpp still is able to handle longs, but not long longs - even though
the compiler can handle it.

With both patches the stuff compiles cleanly.

THX for listening.

CU Tom.
(Thomas M.Ott)
Germany




reply via email to

[Prev in Thread] Current Thread [Next in Thread]