mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/blindcoder/kterm/kterm-devfs-aware.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. diff -pruN kterm-6.2.0/Imakefile kterm-6.2.0_new/Imakefile
  20. --- kterm-6.2.0/Imakefile 1996-07-12 07:01:04.000000000 +0200
  21. +++ kterm-6.2.0_new/Imakefile 2003-08-16 15:23:27.000000000 +0200
  22. @@ -21,8 +21,9 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05
  23. #endif
  24. #if UsePUCCPtyd /* turn on in config/site.def */
  25. PUCCPTYDDEF = -DPUCC_PTYD /* does not need to be setuid */
  26. - PTYLIB = -lpucc
  27. + PTYLIBN = -lpucc
  28. #endif
  29. +PTYLIB = $(PTYLIBN) -lutil
  30. OSMAJORVERSION = OSMajorVersion
  31. OSMINORVERSION = OSMinorVersion
  32. diff -pruN kterm-6.2.0/main.c kterm-6.2.0_new/main.c
  33. --- kterm-6.2.0/main.c 2003-08-16 15:25:26.000000000 +0200
  34. +++ kterm-6.2.0_new/main.c 2003-08-16 15:19:35.000000000 +0200
  35. @@ -286,6 +286,7 @@ extern struct utmp *getutid __((struct u
  36. #endif
  37. #include <sys/param.h> /* for NOFILE */
  38. +#include <pty.h>
  39. #ifdef PUCC_PTYD
  40. #include <local/openpty.h>
  41. int Ptyfd;
  42. @@ -1681,109 +1682,8 @@ char *name;
  43. get_pty (pty)
  44. int *pty;
  45. {
  46. -#ifdef __osf__
  47. int tty;
  48. return (openpty(pty, &tty, ttydev, NULL, NULL));
  49. -#endif
  50. -#if defined(SYSV) && defined(i386) && !defined(SVR4)
  51. - /*
  52. - The order of this code is *important*. On SYSV/386 we want to open
  53. - a /dev/ttyp? first if at all possible. If none are available, then
  54. - we'll try to open a /dev/pts??? device.
  55. -
  56. - The reason for this is because /dev/ttyp? works correctly, where
  57. - as /dev/pts??? devices have a number of bugs, (won't update
  58. - screen correcly, will hang -- it more or less works, but you
  59. - really don't want to use it).
  60. -
  61. - Most importantly, for boxes of this nature, one of the major
  62. - "features" is that you can emulate a 8086 by spawning off a UNIX
  63. - program on 80386/80486 in v86 mode. In other words, you can spawn
  64. - off multiple MS-DOS environments. On ISC the program that does
  65. - this is named "vpix." The catcher is that "vpix" will *not* work
  66. - with a /dev/pts??? device, will only work with a /dev/ttyp? device.
  67. -
  68. - Since we can open either a /dev/ttyp? or a /dev/pts??? device,
  69. - the flag "IsPts" is set here so that we know which type of
  70. - device we're dealing with in routine spawn(). That's the reason
  71. - for the "if (IsPts)" statement in spawn(); we have two different
  72. - device types which need to be handled differently.
  73. - */
  74. - if (pty_search(pty) == 0)
  75. - return 0;
  76. -#endif /* SYSV && i386 && !SVR4 */
  77. -#if defined(ATT) && !defined(__sgi)
  78. - if ((*pty = open ("/dev/ptmx", O_RDWR)) < 0) {
  79. - return 1;
  80. - }
  81. -#if defined(SVR4) || defined(i386)
  82. - strcpy(ttydev, ptsname(*pty));
  83. -#if defined (SYSV) && defined(i386) && !defined(SVR4)
  84. - IsPts = True;
  85. -#endif
  86. -#endif
  87. - return 0;
  88. -#else /* ATT else */
  89. -#ifdef AIXV3
  90. - if ((*pty = open ("/dev/ptc", O_RDWR)) < 0) {
  91. - return 1;
  92. - }
  93. - strcpy(ttydev, ttyname(*pty));
  94. - return 0;
  95. -#endif
  96. -#if defined(__sgi) && OSMAJORVERSION >= 4
  97. - {
  98. - char *tty_name;
  99. -
  100. - tty_name = _getpty (pty, O_RDWR, 0622, 0);
  101. - if (tty_name == 0)
  102. - return 1;
  103. - strcpy (ttydev, tty_name);
  104. - return 0;
  105. - }
  106. -#endif
  107. -#ifdef __convex__
  108. - {
  109. - char *pty_name, *getpty();
  110. -
  111. - while ((pty_name = getpty()) != NULL) {
  112. - if ((*pty = open (pty_name, O_RDWR)) >= 0) {
  113. - strcpy(ptydev, pty_name);
  114. - strcpy(ttydev, pty_name);
  115. - ttydev[5] = 't';
  116. - return 0;
  117. - }
  118. - }
  119. - return 1;
  120. - }
  121. -#endif /* __convex__ */
  122. -#ifdef USE_GET_PSEUDOTTY
  123. - return ((*pty = getpseudotty (&ttydev, &ptydev)) >= 0 ? 0 : 1);
  124. -#else
  125. -#if (defined(__sgi) && OSMAJORVERSION < 4) || (defined(umips) && defined (SYSTYPE_SYSV))
  126. - struct stat fstat_buf;
  127. -
  128. - *pty = open ("/dev/ptc", O_RDWR);
  129. - if (*pty < 0 || (fstat (*pty, &fstat_buf)) < 0) {
  130. - return(1);
  131. - }
  132. - sprintf (ttydev, "/dev/ttyq%d", minor(fstat_buf.st_rdev));
  133. -#ifndef __sgi
  134. - sprintf (ptydev, "/dev/ptyq%d", minor(fstat_buf.st_rdev));
  135. - if ((*tty = open (ttydev, O_RDWR)) < 0) {
  136. - close (*pty);
  137. - return(1);
  138. - }
  139. -#endif /* !__sgi */
  140. - /* got one! */
  141. - return(0);
  142. -#else /* __sgi or umips */
  143. -
  144. - return pty_search(pty);
  145. -
  146. -#endif /* __sgi or umips else */
  147. -#endif /* USE_GET_PSEUDOTTY else */
  148. -#endif /* ATT else */
  149. }
  150. /*