From 10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Feb 2005 08:18:27 +0000 Subject: * modules/gethrxtime: New file. * modules/xnanosleep (Files): Add m4/xnanosleep.m4. (Depends-on): Add gethrxtime. (configure.ac): Add gl_XNANOSLEEP. (Makefile.am): Remove lib_SOURCES line. * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files. * lib/timespec.h (gettime): Return void, since it always succeeds now. All uses changed. * lib/gettime.c (gettime) Likewise. [HAVE_NANOTIME]: Prefer nanotime. Assume gettimeofday succeeds, as POSIX requires. Assime time () succeeds, since other code already does. * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h. (timespec_subtract): Remove. (NANOSLEEP_BUG_WORKAROUND): New constant. (xnanosleep): Use gethrxtime rather than gettime; this simplifies things considerably. Use it only on GNU/Linux hosts, since the workaround shouldn't be needed elsewhere. * m4/gethrxtime.m4, m4/xnanosleep.m4: New files. * m4/gettime.m4 (gl_GETTIME): Check for nanotime. --- modules/xnanosleep | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/xnanosleep') diff --git a/modules/xnanosleep b/modules/xnanosleep index 7317c1ebff..08a3828f41 100644 --- a/modules/xnanosleep +++ b/modules/xnanosleep @@ -4,15 +4,16 @@ a more convenient interface to nanosleep Files: lib/xnanosleep.h lib/xnanosleep.c +m4/xnanosleep.m4 Depends-on: timespec -xalloc +gethrxtime configure.ac: +gl_XNANOSLEEP Makefile.am: -lib_SOURCES += xnanosleep.h xnanosleep.c Include: "xnanosleep.h" @@ -22,4 +23,3 @@ GPL Maintainer: Paul Eggert, Jim Meyering - -- cgit v1.2.1