From 0d445e49a2de8b7de8950e5fd9b1271c82e4d744 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Tue, 26 Jul 1994 04:32:06 +0000 Subject: * configure.in: Added tests for HAVE_SETOWN, HAVE_SYS_FILIO_H. * krlogin.c, krsh.c, krshd.c, krlogin.c, krlogind.c: use them. Still doesn't build on Solaris, but it's a start. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4014 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 5 +++++ src/appl/bsd/configure.in | 6 ++++++ src/appl/bsd/kcmd.c | 6 ++---- src/appl/bsd/krlogin.c | 4 ++-- src/appl/bsd/krlogind.c | 5 +++++ src/appl/bsd/krsh.c | 5 +++++ src/appl/bsd/krshd.c | 5 +++++ 7 files changed, 30 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index f2de44018..d2bc139d4 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 26 00:25:57 1994 Mark Eichin (eichin@cygnus.com) + + * configure.in: Added tests for HAVE_SETOWN, HAVE_SYS_FILIO_H. + * krlogin.c, krsh.c, krshd.c, krlogin.c, krlogind.c: use them. + Sat Jul 23 08:48:50 1994 Tom Yu (tlyu@dragons-lair) * kcmd.c: diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index 385d1b446..bbba8b8bd 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -8,6 +8,12 @@ AC_PROG_INSTALL AC_HAVE_LIBRARY(socket) AC_HAVE_LIBRARY(nsl) AC_FUNC_CHECK(utimes,AC_DEFINE(HAS_UTIMES)) +AC_HAVE_HEADERS(sys/filio.h) +AC_COMPILE_CHECK([F_SETOWN], +[#include +#include ], +[1+F_SETOWN;], +AC_DEFINE(HAVE_SETOWN)) KRB_INCLUDE WITH_KRB5ROOT WITH_KRB4 diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c index bd72f4fdb..4402b1927 100644 --- a/src/appl/bsd/kcmd.c +++ b/src/appl/bsd/kcmd.c @@ -181,11 +181,9 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, krb5_free_creds(ret_cred); return (-1); } -#if defined (hpux) || defined (CRAY) /*hpux does not handle async - io thus setown is disabled */ -#else +#ifdef HAVE_SETOWN fcntl(s, F_SETOWN, pid); -#endif /* hpux */ +#endif sin.sin_family = hp->h_addrtype; memcpy((caddr_t)&sin.sin_addr,hp->h_addr, hp->h_length); sin.sin_port = rport; diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 581e0b8e3..a9f02be62 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -503,7 +503,7 @@ main(argc, argv) it to the reader, and the oob() processing code in the reader will work properly even if it is called when no oob() data is present. */ -#ifndef SYSV +#ifdef HAVE_SETOWN (void) fcntl(rem, F_SETOWN, getpid()); #endif if (options & SO_DEBUG && @@ -1059,7 +1059,7 @@ reader(oldmask) (void) signal(SIGTTOU, SIG_IGN); (void) signal(SIGURG, oob); ppid = getppid(); -#ifndef SYSV +#ifdef HAVE_SETOWN (void) fcntl(rem, F_SETOWN, pid); #endif (void) setjmp(rcvtop); diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index c801455d2..ce5ff5aac 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -155,6 +155,11 @@ static char sccsid[] = "@(#)rlogind.c 5.17 (Berkeley) 8/31/88"; #include #include +#ifdef HAVE_SYS_FILIO_H +/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */ +#include +#endif + #ifdef NO_WINSIZE struct winsize { unsigned short ws_row, ws_col; diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 8551bd32e..9dace665e 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -49,6 +49,11 @@ static char sccsid[] = "@(#)rsh.c 5.7 (Berkeley) 9/20/88"; #include #include +#ifdef HAVE_SYS_FILIO_H +/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */ +#include +#endif + #ifdef KERBEROS #include #include diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index a000a7a0c..5aabbb54e 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -150,6 +150,11 @@ static char sccsid[] = "@(#)rshd.c 5.12 (Berkeley) 9/12/88"; #include +#ifdef HAVE_SYS_FILIO_H +/* get FIONBIO from sys/filio.h, so what if it is a compatibility feature */ +#include +#endif + #ifdef KERBEROS #include #include -- cgit