summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-08-18 09:04:12 +0000
committerJim Meyering <jim@meyering.net>2006-08-18 09:04:12 +0000
commit16901dd5fb98e5348d22e29060795a8b301dcd87 (patch)
tree7336b8bebbfa90f1c5855ca3ac699bf508f4f105
parent1ff9be72d4508e947dff3c871f3cf49151a0da57 (diff)
downloadcoreutils-16901dd5fb98e5348d22e29060795a8b301dcd87.tar.xz
* gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for CLOCK_REALTIME,
since gethrxtime may revert to using clock_gettime via gettime.c. Gabor Z. Papp reported that gethrxtime-using programs failed to link due to unresolved clock_gettime on a linux-2.4.x system.
-rw-r--r--m4/ChangeLog8
-rw-r--r--m4/gethrxtime.m420
2 files changed, 14 insertions, 14 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index d184e99c4..6bf97c912 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,9 +1,9 @@
2006-08-18 Jim Meyering <jim@meyering.net>
- * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Reverse sense of test for
- CLOCK_MONOTONIC. Otherwise, linking a gethrxtime-using program
- with $(LIB_GETHRXTIME) could fail due to unresolved clock_gettime.
- Reported by Gabor Z. Papp.
+ * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for CLOCK_REALTIME,
+ since gethrxtime may revert to using clock_gettime via gettime.c.
+ Gabor Z. Papp reported that gethrxtime-using programs failed to
+ link due to unresolved clock_gettime on a linux-2.4.x system.
2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/m4/gethrxtime.m4 b/m4/gethrxtime.m4
index 2b6fe367c..663bd70a1 100644
--- a/m4/gethrxtime.m4
+++ b/m4/gethrxtime.m4
@@ -1,5 +1,5 @@
-# gethrxtime.m4 serial 3
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# gethrxtime.m4 serial 4
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -56,18 +56,18 @@ AC_DEFUN([gl_PREREQ_GETHRXTIME],
if test $ac_cv_func_nanouptime != yes; then
LIB_GETHRXTIME=
- AC_CACHE_CHECK([whether CLOCK_MONOTONIC is defined],
- gl_cv_have_CLOCK_MONOTONIC,
- [AC_EGREP_CPP([have_CLOCK_MONOTONIC],
+ AC_CACHE_CHECK([whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined],
+ gl_cv_have_clock_gettime_macro,
+ [AC_EGREP_CPP([have_clock_gettime_macro],
[
# include <time.h>
-# ifdef CLOCK_MONOTONIC
- have_CLOCK_MONOTONIC
+# if defined CLOCK_MONOTONIC || defined CLOCK_REALTIME
+ have_clock_gettime_macro
# endif
],
- gl_cv_have_CLOCK_MONOTONIC=yes,
- gl_cv_have_CLOCK_MONOTONIC=no)])
- if test $gl_cv_have_CLOCK_MONOTONIC = yes; then
+ gl_cv_have_clock_gettime_macro=yes,
+ gl_cv_have_clock_gettime_macro=no)])
+ if test $gl_cv_have_clock_gettime_macro = yes; then
LIB_GETHRXTIME=$LIB_CLOCK_GETTIME
fi
AC_SUBST([LIB_GETHRXTIME])