summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-openpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-openpty.c')
-rw-r--r--openbsd-compat/bsd-openpty.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c
index b28235860..e8ad542f8 100644
--- a/openbsd-compat/bsd-openpty.c
+++ b/openbsd-compat/bsd-openpty.c
@@ -147,31 +147,6 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
147 } 147 }
148 return (0); 148 return (0);
149 149
150#elif defined(_UNICOS)
151 char ptbuf[64], ttbuf[64];
152 int i;
153 int highpty;
154
155 highpty = 128;
156#ifdef _SC_CRAY_NPTY
157 if ((highpty = sysconf(_SC_CRAY_NPTY)) == -1)
158 highpty = 128;
159#endif /* _SC_CRAY_NPTY */
160
161 for (i = 0; i < highpty; i++) {
162 snprintf(ptbuf, sizeof(ptbuf), "/dev/pty/%03d", i);
163 snprintf(ttbuf, sizeof(ttbuf), "/dev/ttyp%03d", i);
164 if ((*amaster = open(ptbuf, O_RDWR|O_NOCTTY)) == -1)
165 continue;
166 /* Open the slave side. */
167 if ((*aslave = open(ttbuf, O_RDWR|O_NOCTTY)) == -1) {
168 close(*amaster);
169 return (-1);
170 }
171 return (0);
172 }
173 return (-1);
174
175#else 150#else
176 /* BSD-style pty code. */ 151 /* BSD-style pty code. */
177 char ptbuf[64], ttbuf[64]; 152 char ptbuf[64], ttbuf[64];