based on OS features.
* cleanup.c (pty_cleanup): Add parenthesis about assignment in
conditional (gcc suggestion).
* pty-int.h: Include pty.h if it exists (for openpty prototype
under Linux).
* configure.in: Check for pty.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12451
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-06-28 Ezra Peisach <epeisach@mit.edu>
+
+ * getpty.c (pty_getpty): More conditionalizing variable defintion
+ based on OS features.
+
+ * cleanup.c (pty_cleanup): Add parenthesis about assignment in
+ conditional (gcc suggestion).
+
+ * pty-int.h: Include pty.h if it exists (for openpty prototype
+ under Linux).
+
+ * configure.in: Check for pty.h
+
2000-06-26 Ezra Peisach <epeisach@mit.edu>
* libpty.h: If SOCK_DGRAM is not defined, provide a definition for
return errno;
case 0:
ptyint_void_association();
- if ( retval = ( pty_open_ctty( slave, &fd )))
+ if ((retval = pty_open_ctty(slave, &fd)))
exit(retval);
ptyint_vhangup();
exit(0);
AC_CHECK_TYPE(time_t, long)
AC_FUNC_CHECK(strsave,AC_DEFINE(HAS_STRSAVE))
AC_HAVE_FUNCS(getutent setreuid gettosbyname setsid ttyname line_push ptsname grantpt openpty logwtmp getutmpx)
-AC_CHECK_HEADERS(unistd.h stdlib.h string.h utmpx.h utmp.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h)
+AC_CHECK_HEADERS(unistd.h stdlib.h string.h pty.h utmpx.h utmp.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h)
AC_CHECK_HEADERS(sys/wait.h)
AC_CHECK_FUNCS(waitpid updwtmpx)
DECLARE_SYS_ERRLIST
int slavelength;
int *fd; char *slave;
{
-#if !defined(HAVE__GETPTY)
+#if !defined(HAVE__GETPTY) && !defined(HAVE_OPENPTY)
char *cp;
char *p;
int i,ptynum;
#include <stdio.h>
+#ifdef HAVE_PTY_H
+#include <pty.h>
+#endif
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/file.h>