Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser actually check for clock_nanosleep()
details: https://anonhg.NetBSD.org/src/rev/ed96377ca7d2
branches: trunk
changeset: 333459:ed96377ca7d2
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Nov 05 00:50:17 2014 +0000
description:
actually check for clock_nanosleep()
diffstat:
lib/librumpuser/configure | 74 +++++++++++++++++------------------
lib/librumpuser/configure.ac | 7 +-
lib/librumpuser/rumpuser_config.h.in | 3 +
3 files changed, 43 insertions(+), 41 deletions(-)
diffs (140 lines):
diff -r fdb3cb12d285 -r ed96377ca7d2 lib/librumpuser/configure
--- a/lib/librumpuser/configure Wed Nov 05 00:43:55 2014 +0000
+++ b/lib/librumpuser/configure Wed Nov 05 00:50:17 2014 +0000
@@ -3877,30 +3877,9 @@
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-int
-main ()
-{
-return clock_gettime ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
-if ${ac_cv_lib_rt_clock_gettime+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5
+$as_echo_n "checking for clock_nanosleep in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_nanosleep+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -3914,39 +3893,58 @@
#ifdef __cplusplus
extern "C"
#endif
-char clock_gettime ();
+char clock_nanosleep ();
int
main ()
{
-return clock_gettime ();
+return clock_nanosleep ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_clock_gettime=yes
+ ac_cv_lib_rt_clock_nanosleep=yes
else
- ac_cv_lib_rt_clock_gettime=no
+ ac_cv_lib_rt_clock_nanosleep=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
-if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_nanosleep" >&5
+$as_echo "$ac_cv_lib_rt_clock_nanosleep" >&6; }
+if test "x$ac_cv_lib_rt_clock_nanosleep" = xyes; then :
+
+$as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_nanosleep ();
+int
+main ()
+{
+return clock_nanosleep ();
+ ;
+ return 0;
+}
_ACEOF
-
- LIBS="-lrt $LIBS"
-
-fi
-
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlinfo in -ldl" >&5
$as_echo_n "checking for dlinfo in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlinfo+:} false; then :
diff -r fdb3cb12d285 -r ed96377ca7d2 lib/librumpuser/configure.ac
--- a/lib/librumpuser/configure.ac Wed Nov 05 00:43:55 2014 +0000
+++ b/lib/librumpuser/configure.ac Wed Nov 05 00:50:17 2014 +0000
@@ -33,9 +33,10 @@
AC_TRY_LINK_FUNC([clock_nanosleep],,
AC_CHECK_LIB([rt], [clock_nanosleep])
)
-AC_TRY_LINK_FUNC([clock_gettime],,
- AC_CHECK_LIB([rt], [clock_gettime])
-)
+AC_CHECK_LIB([rt], [clock_nanosleep],
+ AC_DEFINE([HAVE_CLOCK_NANOSLEEP], 1, [clock_nanosleep]),
+ AC_TRY_LINK_FUNC([clock_nanosleep],
+ AC_DEFINE([HAVE_CLOCK_NANOSLEEP], 1, [clock_nanosleep])))
AC_CHECK_LIB([dl], [dlinfo],
AC_DEFINE([HAVE_DLINFO], 1, [dlinfo]),
AC_TRY_LINK_FUNC([dlinfo], AC_DEFINE([HAVE_DLINFO], 1, [dlinfo])))
diff -r fdb3cb12d285 -r ed96377ca7d2 lib/librumpuser/rumpuser_config.h.in
--- a/lib/librumpuser/rumpuser_config.h.in Wed Nov 05 00:43:55 2014 +0000
+++ b/lib/librumpuser/rumpuser_config.h.in Wed Nov 05 00:50:17 2014 +0000
@@ -15,6 +15,9 @@
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
+/* clock_nanosleep */
+#undef HAVE_CLOCK_NANOSLEEP
+
/* dlinfo */
#undef HAVE_DLINFO
Home |
Main Index |
Thread Index |
Old Index