[Top][All Lists]

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

gettime sync from coreutils

From: Paul Eggert
Subject: gettime sync from coreutils
Date: Mon, 09 Jan 2006 15:22:36 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this.  Jim and I thought it better to complain at
compile-time if someone is really building on an ancient system.  We
suspect that there aren't any such systems active any more, but just
in case, users can define OK_TO_USE_1S_CLOCK.

2006-01-09  Paul Eggert  <address@hidden>

        Sync from coreutils.

        * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
        Report an error at compile-time if only a 1-second nominal clock
        resolution is found.

Index: lib/gettime.c
RCS file: /cvsroot/gnulib/gnulib/lib/gettime.c,v
retrieving revision 1.5
diff -p -u -r1.5 gettime.c
--- lib/gettime.c       14 May 2005 06:03:58 -0000      1.5
+++ lib/gettime.c       9 Jan 2006 23:02:07 -0000
@@ -45,8 +45,14 @@ gettime (struct timespec *ts)
     ts->tv_nsec = tv.tv_usec * 1000;
 # else
+#  ifndef OK_TO_USE_1S_CLOCK
+#   error "Only 1-second nominal clock resolution found.  Is that intended?" \
+          "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
+#  endif
   ts->tv_sec = time (NULL);
   ts->tv_nsec = 0;
 # endif

reply via email to

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