home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / src / s / irix5-0.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-18  |  1.6 KB  |  65 lines

  1. #include "s-usg5-4.h"
  2. #ifdef LIBS_SYSTEM
  3. #undef LIBS_SYSTEM
  4. #endif
  5.  
  6. #ifdef SYSTEM_TYPE
  7. #undef SYSTEM_TYPE
  8. #endif
  9. #define SYSTEM_TYPE "silicon-graphics-unix"
  10.  
  11. #ifdef SETUP_SLAVE_PTY
  12. #undef SETUP_SLAVE_PTY
  13. #endif
  14.  
  15.  
  16. /* Define HAVE_ALLOCA to say that the system provides a properly
  17.    working alloca function and it should be used. */
  18. #define HAVE_ALLOCA
  19. #undef C_ALLOCA
  20. #define alloca __builtin_alloca
  21.  
  22. /* use K&R C */
  23. #ifndef __GNUC__
  24. #define C_SWITCH_MACHINE -cckr
  25. #endif
  26.  
  27. /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
  28.    because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.)  Instead
  29.    we'll just define WNOHANG right here.
  30.    (An implicit decl is good enough for wait3.)  */
  31.  
  32. /* #define WNOHANG        0x1 */
  33.  
  34. /* No need to use sprintf to get the tty name--we get that from _getpty.  */
  35. #ifdef PTY_TTY_NAME_SPRINTF
  36. #undef PTY_TTY_NAME_SPRINTF
  37. #endif
  38. #define PTY_TTY_NAME_SPRINTF
  39. /* No need to get the pty name at all.  */
  40. #ifdef PTY_NAME_SPRINTF
  41. #undef PTY_NAME_SPRINTF
  42. #endif
  43. #define PTY_NAME_SPRINTF
  44. #ifdef emacs
  45. char *_getpty();
  46. #endif
  47. /* We need only try once to open a pty.  */
  48. #define PTY_ITERATION
  49. /* Here is how to do it.  */
  50. /* It is necessary to prevent SIGCHLD signals within _getpty.
  51.    So we block them. */
  52. #define PTY_OPEN                        \
  53. {                                \
  54.   int mask = sigblock (sigmask (SIGCHLD));            \
  55.   char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0);    \
  56.   sigsetmask(mask);                        \
  57.   if (name == 0)                        \
  58.     return -1;                            \
  59.   if (fd < 0)                            \
  60.     return -1;                            \
  61.   if (fstat (fd, &stb) < 0)                    \
  62.     return -1;                            \
  63.   strcpy (pty_name, name);                    \
  64. }
  65.