summaryrefslogtreecommitdiff
path: root/modules/xnanosleep
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-02-26 08:18:27 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-02-26 08:18:27 +0000
commit10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a (patch)
treea62cb33af6e62da2f4294efb9ac6882fdaaaaa11 /modules/xnanosleep
parente8cddd652b70864dafe0698c310611f7a6a67e30 (diff)
downloadgnulib-10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a.tar.gz
* 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.
Diffstat (limited to 'modules/xnanosleep')
-rw-r--r--modules/xnanosleep6
1 files changed, 3 insertions, 3 deletions
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
-