diff options
author | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:57:25 +0100 |
commit | a0b2dce9bf518f561bbb5070c0fb0c38f49035dd (patch) | |
tree | 24298b823e93d4e6efe13f48f1512707ebd625f8 /openbsd-compat/bsd-openpty.c | |
parent | 9d4942dc192b6f1888c9ab73a512dd9b197b956c (diff) | |
parent | 76aa43d2298f322f0371b74462418d0461537131 (diff) |
New upstream release (7.7p1)
Diffstat (limited to 'openbsd-compat/bsd-openpty.c')
-rw-r--r-- | openbsd-compat/bsd-openpty.c | 25 |
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]; |