version 1.2, 1999/09/29 21:15:54 |
version 1.3, 1999/09/30 05:03:05 |
|
|
return 1; |
return 1; |
|
|
#else /* HAVE_DEV_PTS_AND_PTC */ |
#else /* HAVE_DEV_PTS_AND_PTC */ |
#ifdef CRAY |
|
char buf[64]; |
|
int i; |
|
|
|
for (i = 0; i < 128; i++) |
|
{ |
|
sprintf(buf, "/dev/pty/%03d", i); |
|
*ptyfd = open(buf, O_RDWR|O_NOCTTY); |
|
if (*ptyfd < 0) |
|
continue; |
|
sprintf(namebuf, "/dev/ttyp%03d", i); |
|
/* Open the slave side. */ |
|
*ttyfd = open(namebuf, O_RDWR|O_NOCTTY); |
|
if (*ttyfd < 0) |
|
{ |
|
error("%.100s: %.100s", namebuf, strerror(errno)); |
|
close(*ptyfd); |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
return 0; |
|
|
|
#else /* CRAY */ |
|
|
|
/* BSD-style pty code. */ |
/* BSD-style pty code. */ |
|
|
char buf[64]; |
char buf[64]; |
|
|
return 1; |
return 1; |
} |
} |
return 0; |
return 0; |
#endif /* CRAY */ |
|
#endif /* HAVE_DEV_PTS_AND_PTC */ |
#endif /* HAVE_DEV_PTS_AND_PTC */ |
#endif /* HAVE_DEV_PTMX */ |
#endif /* HAVE_DEV_PTMX */ |
#endif /* HAVE__GETPTY */ |
#endif /* HAVE__GETPTY */ |