From 80e34e155ef30a3767c5d94ff2b775a6dd0c11fe Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 16 Aug 2000 11:17:30 +0000 Subject: [PATCH] do getmsg testing the same way as in krb4 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8953 ec53bebd-3082-4978-b11e-865c3cabbd6b --- configure.in | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 71af4e9d0..6c7464184 100644 --- a/configure.in +++ b/configure.in @@ -421,7 +421,6 @@ AC_CHECK_FUNCS([ \ _getpty \ _scrsize \ fcntl \ - getmsg \ gettimeofday \ getuid \ grantpt \ @@ -578,7 +577,28 @@ fi # # And also something wierd has happend with dec-osf1, fallback to bsd-ptys -if test "$ac_cv_func_getmsg" = yes; then +AC_CHECK_FUNC(getmsg) + +AC_CACHE_CHECK(for working getmsg, ac_cv_func_getmsg_work, +AC_TRY_RUN( +[ +#include +#include + +int main() +{ + int ret; + ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); + if(ret < 0 && errno == ENOSYS) + return 1; + return 0; +} +], ac_cv_func_getmsg_work=yes, ac_cv_func_getmsg_work=no, +ac_cv_func_getmsg_work=no)) +test "$ac_cv_func_getmsg_work" = "yes" && +AC_DEFINE(HAVE_GETMSG, 1, [Define if you have a working getmsg.]) + +if test "$ac_cv_func_getmsg_work" = yes; then AC_MSG_CHECKING(for streamspty) case "$host" in *-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)