OSF1 patch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@264 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -281,12 +281,18 @@ AC_CHECK_HEADERS(sys/tty.h termio.h termios.h utmpx.h sys/uio.h)
|
||||
|
||||
# Simple test for streamspty, based on the existance of getmsg(), alas
|
||||
# this breaks on SunOS4 which have streams but BSD-like ptys
|
||||
#
|
||||
# And also something wierd has happend with dec-osf1, fallback to bsd-ptys
|
||||
|
||||
AC_MSG_CHECKING(for streamspty)
|
||||
krb_cv_sys_streamspty="no"
|
||||
if expr "`uname -sr`" : "SunOS 4" > /dev/null; then :; else
|
||||
case "`uname -sr`" in
|
||||
SunOS\ 4*|OSF1*)
|
||||
krb_cv_sys_streamspty=no
|
||||
;;
|
||||
*)
|
||||
krb_cv_sys_streamspty="$ac_cv_func_getmsg"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$krb_cv_sys_streamspty" = yes; then
|
||||
AC_DEFINE(STREAMSPTY)
|
||||
fi
|
||||
|
@@ -374,6 +374,16 @@ static char *ptsname(int fd)
|
||||
|
||||
int getpty(int *ptynum)
|
||||
{
|
||||
#ifdef __osf__
|
||||
int master;
|
||||
int slave;
|
||||
if(openpty(&master, &slave, line, 0, 0) == 0){
|
||||
close(slave);
|
||||
return master;
|
||||
}
|
||||
return -1;
|
||||
#else
|
||||
|
||||
int p;
|
||||
char *cp, *p1, *p2;
|
||||
int i;
|
||||
@@ -495,6 +505,7 @@ int getpty(int *ptynum)
|
||||
#endif /* STREAMSPTY */
|
||||
#endif /* OPENPTY */
|
||||
return(-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef LINEMODE
|
||||
@@ -877,7 +888,7 @@ static int my_find(int fd, char *module)
|
||||
sl.sl_modlist=(struct str_mlist*)malloc(n * sizeof(struct str_mlist));
|
||||
sl.sl_nmods = n;
|
||||
n = ioctl(fd, I_LIST, &sl);
|
||||
if(n != 0){
|
||||
if(n < 0){
|
||||
perror("ioctl(fd, I_LIST, n)");
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user