aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-21 09:04:48 +0000
committerRichard M. Stallman1993-11-21 09:04:48 +0000
commit4ba131170f39bb88c6bc997afa7a00608659f3f2 (patch)
tree7ebdea2b5e4bafe8a457a5c5788044ec8fe0756f /src
parent14442cbfd82179a676e6223396c2f3276e2921a1 (diff)
downloademacs-4ba131170f39bb88c6bc997afa7a00608659f3f2.tar.gz
emacs-4ba131170f39bb88c6bc997afa7a00608659f3f2.zip
(PTY_ITERATION, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF):
Defined to use all the available PTYs in an ELF environment which uses the SVR4 mechanisms; grantpt(), unlockpt() and ptsname(). (FIRST_PTY_LETTER): Deleted.
Diffstat (limited to 'src')
-rw-r--r--src/s/dgux.h45
1 files changed, 40 insertions, 5 deletions
diff --git a/src/s/dgux.h b/src/s/dgux.h
index 55e413e3d97..4c6e270adef 100644
--- a/src/s/dgux.h
+++ b/src/s/dgux.h
@@ -246,11 +246,6 @@ is to define BROKEN_FIONREAD and not use INTERRUPT_INPUT.
246#define HAVE_TERMIOS 246#define HAVE_TERMIOS
247#define NO_TERMIO 247#define NO_TERMIO
248 248
249/* Letter to use in finding device name of first pty,
250 if system supports pty's. 'p' means it is /dev/ptyp0 */
251
252#define FIRST_PTY_LETTER 'p'
253
254/* 249/*
255 * Use a Berkeley style sys/wait.h. 250 * Use a Berkeley style sys/wait.h.
256 * This makes WIF* macros operate on structures instead of ints. 251 * This makes WIF* macros operate on structures instead of ints.
@@ -348,6 +343,46 @@ CC=gcc
348 343
349#else /* not COFF */ 344#else /* not COFF */
350 345
346/* Pseudo-terminal support under SVR4 only loops to deal with errors. */
347
348#define PTY_ITERATION for (i = 0; i < 1; i++)
349
350/* This sets the name of the master side of the PTY. */
351
352#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
353
354/* This sets the name of the slave side of the PTY. On SysVr4,
355 grantpt(3) forks a subprocess, so keep sigchld_handler() from
356 intercepting that death. If any child but grantpt's should die
357 within, it should be caught after sigrelse(2). */
358
359#define PTY_TTY_NAME_SPRINTF \
360 { \
361 char *ptsname(), *ptyname; \
362 \
363 sigblock(sigmask(SIGCLD)); \
364 if (grantpt(fd) == -1) \
365 fatal("could not grant slave pty"); \
366 sigunblock(sigmask(SIGCLD)); \
367 if (unlockpt(fd) == -1) \
368 fatal("could not unlock slave pty"); \
369 if (!(ptyname = ptsname(fd))) \
370 fatal ("could not enable slave pty"); \
371 strncpy(pty_name, ptyname, sizeof(pty_name)); \
372 pty_name[sizeof(pty_name) - 1] = 0; \
373 }
374
375/* Push various streams modules onto a PTY channel. */
376
377#define SETUP_SLAVE_PTY \
378 if (ioctl (xforkin, I_PUSH, "ptem") == -1) \
379 fatal ("ioctl I_PUSH ptem", errno); \
380 if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
381 fatal ("ioctl I_PUSH ldterm", errno); \
382 if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
383 fatal ("ioctl I_PUSH ttcompat", errno);
384
385
351#define C_COMPILER \ 386#define C_COMPILER \
352 TARGET_BINARY_INTERFACE=m88kdguxelf gcc -traditional 387 TARGET_BINARY_INTERFACE=m88kdguxelf gcc -traditional
353 388