From 0ffc198db1d572663ac11947a704ca14e06dc758 Mon Sep 17 00:00:00 2001 From: gfk Date: Tue, 27 Aug 2002 02:03:33 +0000 Subject: [PATCH] 2 portability fixes: Added tests for i386 on BSDs and added a check for sched_setscheduler. --- configure.in | 5 +++++ server/drivers/timing.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index c7ca7d8..f4c6b13 100644 --- a/configure.in +++ b/configure.in @@ -87,11 +87,16 @@ AC_CHECK_HEADERS(sched.h sys/sched.h machine/cpufunc.h sys/types.h machine/pio.h ETR_SYSV_IPC ETR_UNION_SEMUN +dnl sched_setscheduler on OpenBSD +AC_CHECK_FUNCS(sched_setscheduler) + dnl i386_get_ioperm on NetBSD&OpenBSD +AC_CHECK_LIB(i386, i386_get_ioperm) AC_CHECK_LIB(i386, i386_get_ioperm, AC_DEFINE([HAVE_I386_IOPERM_NETBSD],[1], [Define if you have the NetBSD&OpenBSD version of i386_ioperm functions.]),[ dnl i386_get_ioperm on FreeBSD + AC_CHECK_LIB(c, i386_get_ioperm) AC_CHECK_LIB(c, i386_get_ioperm, AC_DEFINE([HAVE_I386_IOPERM_FREEBSD],[1], [Define if you have the FreeBSD version of the i386_ioperm functions.]), diff --git a/server/drivers/timing.h b/server/drivers/timing.h index ecdbe30..6ebdaf9 100644 --- a/server/drivers/timing.h +++ b/server/drivers/timing.h @@ -42,7 +42,7 @@ // Autoselect... Does this always work well ? #ifdef DELAY_AUTOSELECT -# ifdef HAVE_SCHED_H +# if defined HAVE_SCHED_H && defined HAVE_SCHED_SETSCHEDULER # define DELAY_NANOSLEEP # else # define DELAY_GETTIMEOFDAY